MySQL 5.7 installation process encountered in the pit

I met a few pit in the installation process, specially recorded.
Start when there will be a mistaken:

The effect that can not update mysql pid file and exit.

View error.log, as shown:

To the effect that ibdtata1 file is not enough, initialization of pages too. Preliminary judge for the configuration parameters of the problem profile.

It piecemeal or comments after resolved.

 

Initialization commands:

bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/mydata/data         # Before MySQL 5.6

bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/mydata/data        # MySQL 5.7 and up

 

This time I used:

mysqld --initialize --user=mysql --datadir=/opt/data --basedir=/opt/mysql --socket=/opt/data/mysqld.sock

 

After doing the mysql.server soft, start with a service mysql start

 

Or start with another command format:

/usr/local/mysql/bin/mysqld_safe --user=mysql --basedir=/usr/local/mysql --datadir=/data & 启动mysql服务
Start mysql service to log on after initialization, you must first change the password: 
the ALTER the USER " root " @ " localhost " IDENTIFIED BY " ! @ # Shsnc " ; 
flush privileges;

 

Guess you like

Origin www.cnblogs.com/tigergaonotes/p/11079305.html