How to connect libreoffice client to mysql on server

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.

My personal preference would be to through workbench, as it allows you to define and easily adjust your tables to a degree that isn’t supported by the LO GUI. You can also define triggers, procedures and user functions in workbench that you won’t be able to create and test as easily in LO.

Note that any queries you create in workbench won’t be available to LO unless you define those queries as Views. You could also create queries in workbench, export them as sql text files, and then copy/paste the sql into the sql query editor in LO and save them as queries within your ODB file.

Similarly, any forms that you create with workbench are not available to LO. Forms are better in LO compared to workbench.

1 Like

Okay, I’ll install workbench on my desktop.

Btw, are triggers events?

Base has been created for many different databases. So Base won’t support all different data types any database will offer. Don’t use a datatype, which isn’t supported by Base. So I would prefer to create the table with Base and set details in Workbench (like setting a default value for inserting new values, setting a default for updating a table …).

2 Likes

MySQL triggers!:

https://dev.mysql.com/doc/refman/8.0/en/trigger-syntax.html

1 Like

Hi Robert,
I did create my table and form in base but was unable to make it work in mysql. I’ll be back at work in a couple of weeks and hopefully with my new how to connect knowledge, make it work.
Thanks again!

Hi Robert,
I figured out how to make local connections to a test database in mysql from Lo.
Now I would like to move my work order database from Lo Hsqldb to mysql but workbench does not list Hsqldb or stored connections under generic sql92.
How do I do this or should i just create a new work order db in mysql.
Thank you

HSQLDB has nothing to do with MySQL/MariaDB. Connect with Base to MySQL/MariaDB. Open also the base file with HSQLDB. Copy the content you need in MariaDB from the Base file for HSQLDB.