Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index




Ian Whitfield wrote:
On 11/01/2012 11:14 PM, Girvin R. Herr wrote:
Ian,
Are you starting mysqld with "--skip-networking"?
If so, then remove it for "localhost" access. LO Base uses localhost to access mysqld and will give a failed to connect error if it can't connect via localhost. MyAdmin does not use localhost to connect, so it would work fine while Base will not.

No Gavin I am not!! MySQL starts automatically at Boot.
<snip>

IanW
Pretoria RSA.

Ian,
If mysqld starts automatically at boot, then, like my Slackware system, you probably have a system script somewhere that starts mysqld. The --skip-networking may be in that script. In Slackware, it is "/etc/rc.d/rc.mysql" which has a macro definition in the beginning: "SKIP=--skip-networking". Simply commenting that line out with a # in column one enables network (localhost) access. You might check for something like that on your system.

In case it will help, here are the commands I use to configure MySQL and create my databases:

   *

     Before first MySQL use, at the shell enter:
     "mysql_secure_installation" to set the root password, remove the
     "test" database, and remove network root access. This program will
     prompt for these items.  Note that removing network root access
     only applies to remote root MySQL logins, it does not disable all
     network access as in --skip-networking.

   *

     At the shell, enter: "mysql --user=root -p mysql" to bring up the
     MySQL monitor program. While in this program, the prompt will
     change to "MySQL> ". Enter the following commands, terminated by a
     semicolon (;):

     GRANT ALL PRIVILEGES ON *.* TO <user>@localhost IDENTIFIED BY
     '<password>' WITH GRANT OPTION;

     GRANT ALL PRIVILEGES ON *.* TO <user>@"%" IDENTIFIED BY
     '<password>' WITH GRANT OPTION;

     GRANT ALL PRIVILEGES ON *.* TO admin@localhost IDENTIFIED BY
     '<password>' WITH GRANT OPTION;

     GRANT RELOAD,PROCESS ON *.* TO admin@localhost ;

     CREATE DATABASE <database name>;
     CREATE DATABASE <additional database name>;
     .
     .
     exit

These installation & setup instructions are in the MySQL Reference Manual on the MySQL website or in the documentation directory of your computer (should be installed when MySQL is installed).

You should then do the following tests:
Assuming LO Base is already setup, in Base drill down as:

   Edit -> Database -> Connection Type  -> Next -> Test Connection
   (enter your password when asked)

   You should get the message: "...connection was established successfully"

Then continue:

   OK -> Next -> Test Class

   You should get the message: "JDBC driver loaded successfully"
   (This assumes you are using JDBC)

If either of these tests do not work, then there is still something wrong in your configuration. If the first test fails, then the problem may be the --skip-networking issue. If the first test is okay but the second test fails, then it is most likely your JDBC driver configuration.

You might also check the MySQL error log in "/var/lib/mysql/<hostname>.err". You might find something useful there. Also, verify "/var/lib/mysql" has owner and group settings of "mysql:mysql", although if you can access your database with the mysql or myadmin program, this is probably okay. If you used mysql_secure_installation, then this should have been set up properly by mysql_secure_installation. You can start fresh with this by renaming or deleting the "/var/lib/mysql" directory.

Of course, all of this assumes you have root access on your computer. Note that MySQL root is different from system root, and they _should_ _not_ share passwords!

Hope this helps.
Girvin Herr


--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.