How to connect libreoffice client to mysql on server

Hi Iplaw,
I seems no matter how hard i try, or all advice i get that it can be done, I can’t import the database/table i created in Lo base into workbench. ( too bad cause i put a lot time in on it)
So I’ll start over hoping this works.

I created an empty database in workbench named WorkOrders, then the 12 fields i need for my table and Lo form.
To see if i can connect this table to a new Lo base form, i made all the fields, except two date fields, varchar45.
Once I’m certain i can do that i come back and adjust the varchar’s to different sizes.

If thT works, should i change default/expressions in the table or form?

I was told i can’t get individual field security in LO, which is why i am using mysql. Do you know where it is or how to do it?

If you have created a table with Base in a MySQL database it should also be available in MySQL Workbench. Both connect to the same data source. Might be it doesn’t appear directly. In Base you could refresh the tables view by View → Refresh Tables. Sen a screenshot of the opened database in MySQL Workbench and another of Base connecting to this database.

1 Like

Hi R,
I created my first db/table in base with hsqldb (the only option), but could not export, open/connect, or get .sql or “dumps” to open or transfer to mysql.

On recommendations, abandoned that and made new db in mysql, with eventual hope of connecting base to it.
Creating it was successful but i can’t connect to it from LO.
(I’ve put LO and mysql both on my laptop for homework)
It keeps saying it can’t connect to ‘localhost’

I don’t know how to do pictures.

Thought you have really connected to MySQL/MariaDB. Seems I don’t understand right what you posted 2 days before.

You could upload screenshots with 7. symbol in this editor. Please show what you choose in LibreOffice when you try to create a database, which connects to MySQL.

1 Like

The book.libreoffice.org, mysql/mariadb database test connect (libretest db, lotest user, libre password) worked at work over the Lan but i could not connect my LibreOffice workorder/db there.

I wanted to keep working at home so i tryed the same libretest test here but it wont accept “localhost” or anything in server connection.

Thats why i built a new db right in mysql/workbench this morning but i can connect, it has th same server not found error.

Update:
I noticed my workorder schema had no grants so i added a user and password with all rights. Closed out all apps, restarted entered new user/pass but got the same "can’t connect to server on ‘localhost’ (10061)

It will work with “localhost”, if MySQL/MariaDB is installed at the same computer.
It will work with an IP, when it is installed an another place in the lan, like 192.168.0.1
It will work with a complete address with URL, if the database is connected from you trough www.
You could also connect by an ssh-tunnel to another place, but you will need ssh working on both places - server and client.

So: Where is you MySQL/MariaDB database?

1 Like

Its on my laptop with libreoffice? Maybe thats the problem, both cant be on same device?

If both are on the same device it should work with “localhost”. Which system do you use? Has server for MySQL/MariaDB been started?

1 Like

Win 10 home.
I first start mysql on console with password: #GoBucks.

Then start workbench by clicking:
Local instance MySql83.
Root
Localhost via pipe mysql
working with
Then enter password in connect to mysql server:
Service: mysql@local:mysql
User: root
Password: #GoBucks.
OK

Then i get a connection warning (local instance mysql83)
Is some features not working newer 8 workbench not working with older mysql.
I click ontinue anyway button

So you could connect with workbench.
And what did you set when trying to connect with Base?

1 Like

I open Lo, click on base, database wizard opens.
Next
Bullet “connect to existing db.”
List: Mysql/maria db
Next
Bullet "connect directly (using mariadb c connector)
Next
Database name: workorders
Bullet server/port
Server: localhost
Port 3306
Next
User name: wouserone
Password required yes
Test connection yes
Authentication required
Password: wouserpass
Enter
X can’t connect to server on ‘localhost’ (10061)

Is this the whole error?
Username you have defined before is root. Does the database exist? Do you see the database in workbench?
Might be this helps: How to fix MySQL can't connect to server on localhost (10061) error | sebhastian

1 Like

The “more” button: error
Sql status: HY000
Error code: 2002

Can’t connect to server on “localhost” (100061)

As far i can tell im doing everything right but am VERY confused of all i have to do to make a simple work order table/form work.
Been using Paradox for 30 years, never had to have 3 separate apps.

If i can get over this hump i will be able to retire Paradox, install LO on all workstations and begin phase out of server 2019 and all other MS products. All open source!

You could work with internal databases. HSQLDB and Firebird are provided. You decided to get the connection to MySQL. You won’t need workbench, but it will help. You only need a working MySQL database and the right connection to it. But a working database needs a user and a database, to which the user could connect.

Seems it is a little bit tricky with Windows. All I see is something like a Windows installer. Never used this. I’m only working with Linux. Installed MariaDB from the packages of my system, does the steps I have written down for Base Guide (newer: German Base Handbuch 24.2) and the connection works well. I won’t need the workbench here.

You have started workbench: Please send a screenshot with a working database in Mysql workbench.

1 Like

I started workbench because it seems like the right thing to do, seeing i don’t know sql at all.
Generally I think it’s something i dont know. LoL
A simple which way to connect.
I was able to connect with the test connect so i know it’s possible.
Will start again tomorrow at work.
Meanwhile,
Can you give a step by step on 7. Symbol picture upload?
Thank you!

It is unclear to me whether you have actually succeeded in:

  • setting up a functional connection to a mysql server ;
  • creating a database schema to which a user with the correct privileges can connect;
  • defining one or more tables and filling them with data.

I order for any mysql table to allow data entry from within LO, the table needs at least a primary key field where each entry is unique. How you define that field is up to you, but generally, most people choose an integer field type, e. g.

int(4) unsigned not null primary key

It seems that you need to understand first how to use mysql before trying to connect to the mysql database via LO. There are plenty of tutorials and guides for this on the Internet, which are totally separate from using LO.

1 Like

You have started workbench.

  1. Does it start without any error?
  2. Do you see any database on the left near the title “Schemas”?
  3. Could you add a new table to the database “test” (should be there by default)? You could use the table symbol with (+) to create a table, no need to use SQL.

I couldn’t upload better step by step pictures as I created for Base Guide. I’m using OpenSUSE Linux with MariaDB here. So I can’t see the problems you get with MySQL under Windows. If using Windows I would also install MariaDB, because the direct driver from LO is a MariaDB driver …

1 Like

Yes, Iplaw…, It’s like trying to learn Dos for the first time, but why would anyone have done that back in the 80’s if they already had the Gui Windows?

Here’s a good example:
I read Robert’s link above, How to fix mysql can’t connect… and found port=3306 commented out, #port=3306 in my.ini.

I corrected it but mysql wouldn’t start, so i concluded i need to do a reinstall.

That’s where I’m currently stopped.
If I enter:
Mysql> --install (as the article suggests)

Nothing happens and it just indents:
Mysql> --install
→ _ (Blinking cursor)

Like it’s waiting for a execute command, which i don’t know.

All help is greatly appreciated.

Cant find this. I could read

mysqld --install

This should install the MySQL server. You could do this also with re-running the MySQL-installer you have installed MySQL before.

1 Like

I have to revisit that soon, but in the meantime…, I was able to connect my WorkOrders schema to my desktop at work!!!

Now I got a new question.
Should I build my tables in LO or through workbench.?
Workbench and LO base seem to have different field types.

Should I start a new thread?

Thank you :blush: all !!
All your time and patience has not been wasted on me.