Web lists-archives.com

Re: Post-installation config and startup questions






On 6/23/2015 10:59 AM, Steve Matzura wrote:
I'm building a mail system with Dovecot, Postfix and Mailman with
MySQL. I have the other three products installed but not yet
configured. I'll do that after I get MySQL running.

The documentation at
http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html
was instrumental in remedying some errors I made along the way by
following an installation procedure for Ubuntu instead of for Fedora.
The installation completed successfully.


These should be the same instructions as we post here:
http://dev.mysql.com/doc/refman/5.6/en/linux-installation-yum-repo.html

But perhaps you needed to follow these instead?
http://dev.mysql.com/doc/refman/5.6/en/replace-third-party-yum.html


The next step in the instructions I originally read said the next
thing to do was run mysql_install_db. It started out well:
... snip ...

And then things fell apart.

2015-06-23 11:54:52 23737 [ERROR] Incorrect definition of table
mysql.proc: expected column 'sql_mode' at position 14 to have type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERRO
2015-06-23 11:54:52 23737 [ERROR] Incorrect definition of table
mysql.event: expected column 'sql_mode' at position 14 to have type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH'),
found type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_A
ERROR: 1136  Column count doesn't match value count at row 1
2015-06-23 11:54:53 23737 [ERROR] Aborting
... snip ...

Since this is a new installation, I decided to take the advice of the
automated instructions:

# mysqld_safe --defaults-file
150623 11:58:52 mysqld_safe Logging to '/var/log/mysqld.log'.
150623 11:58:52 mysqld_safe Starting mysqld daemon with databases from
/var/lib/mysql
150623 11:58:53 mysqld_safe mysqld from pid file
/var/run/mysqld/mysqld.pid ended

Unless I'm an absolute dolt, this looked successful. Since this was my
first time running MySQL, I tried the next step as if it were a new
install, which it's supposed to be:

# /usr/bin/mysql_secure_installation


Unless you can tail the end of the MySQL error log and see that it is "ready for connections", then you may not have started MySQL and you would not be ready for mysql_secure_installation.




NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
       SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none): ^C
Aborting!

Cleaning up...
Cleaning up...
Warning: Could not unlink .my.cnf.24101: No such file or directory
Warning: Could not unlink .mysql.24101: No such file or directory

And that's where things are.

Any help greatly appreciated.


@Andy - a.smith@xxxxxxxxxx -
you haven't said what OS you are installing this on or how you have installed MySQL.

Yes, he did but not directly and not completely. He is installing on some version of Fedora using a YUM repository.


@Steve

You might need to revert the situation to the state it was in just before you run mysql_install_db then try again. That situation would be
* The binaries are installed
* The --datadir location (which defaults to /var/lib/mysql/data on most Linux flavors) is empty.

But, before you attempt to return to that state:
1) Is your mysqld running? If so, what errors were recorded to the log in your last startup (not messages, errors).

2) Is the running MySQL the package you were trying to install? Give us the last few lines of the error log to show us which release is installed and ready for connections.

2) How many my.cnf files (or .my.cnf) do you have currently on your system? Where are they located?

--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN

Become certified in MySQL! Visit https://www.mysql.com/certification/ for details.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql