In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Done with "file / usr/share/mysql/czech/errmsg.sys from install of mysql-community-common-5.7.9-1.el6
Solution: delete the original package and reinstall it.
Yum-y remove mysql-libs-*
2. Initialize the installation database (here it is performed as root): bin/mysqld-- initialize-- user=mysql
Report an error [ERROR]-- initialize specified but the data directory has files in it. Aborting.
Solution: password initialization does not modify initialization password successfully
Method 1:
# / etc/init.d/mysqld stop
# mysqld_safe-user=mysql-skip-grant-tables-skip-networking &
# mysql-u root mysql
# mysql-u root mysql
Mysql > UPDATE user SET Password=PASSWORD ('newpassword') where USER='root'
Mysql > FLUSH PRIVILEGES
Mysql > quit
# / etc/init.d/mysqld restart
# mysql-uroot-p
Enter password:
Mysql >
Note ['newpassword'' root']
ERROR 1054 (42S22): Unknown column''root'' in' where clause'
Update single quotation marks to double quotation marks
Note [Password]
ERROR 1054 (42S22): Unknown column 'password' in' field list'
Mysql > ERROR 1054 (42S22): Unknown column 'password' in' field list'
Reason for the error: the password field is no longer available in the mysql database, and the password field has been changed to authentication_string.
Update mysql.user set authentication_string=PASSWORD ('password') where User='root'
3. Start the database service MySQL Daemon failed to start. Failed to start the service
3.1View the log file of mysqld
# less / var/log/mysqld.log
/ usr/libexec/mysqld: Can't change dir to 'XXX' (Errcode: 13)
3.2. First of all, check the database log.
Mysqld started
[Warning] Can't create test file xxx.lower-test
[Warning] Can't create test file xxx.lower-test
/ usr/libexec/mysqld: Can't change dir to'/ xxx' (Errcode: 13)
[ERROR] Aborting
First of all, check the permissions and users of the data directory and log directory. There is no problem with the permissions and users. That should be the permission limit of SELINUX.
3.3. Check the current configuration information first.
# getenforce
Enforcing
It means that SELinux has been enabled. Just shut it down.
Turn off method:
# setenforce 0 (0 | 1 on | off)
Or
Setsebool ftpd_disable_trans 1
Orders are also fine.
3.4. Check the database log will appear
Mysqld started
2018-04-17T03:48:30.343457Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2018-04-17T03:48:30.345407Z 0 [ERROR] Aborting
Error: Please read "Security" section of the manual to find out how to run mysqld as root!
As prompted, I checked the Security section of / opt/redmine-1.2.1-1/mysql/docs/mysql.info and found that it was because MySQL did not want root users to launch mysql directly for security reasons.
Solution
1. Root users are forced to start. In the startup process, add the parameter:-- user=root [service mysqld start-- user=root]
2. Modify / etc/init.d/mysqld 137,
$exec $MYSQLD_OPTS-datadir= "$datadir"-socket= "$socketfile"\
-pid-file= "$mypidfile"\
-basedir=/usr-- user=mysql $extra_opts > / dev/null &
Thank you, pidboy!
Update mysql to root
4. Log in to database and report an error ERROR 1820 (HY000): You must reset your password using ALTER USER statement befo re executing this statement. Direct execution:
Set password=password ('password')
5. Remote login error Host is not allowed to connect to this MySQL server first talk about this error. In fact, our MySQL does not allow remote login, so remote login failed.
The solution is as follows:
1. Log in to the MySQL mysql-u root-p password on the machine with MySQL
two。 Execute use mysql
3. After executing the sentence update user set host ='% 'where user =' root';, you may report an error, regardless of it.
4. Execute FLUSH PRIVILEGES
After the above four steps, the problem can be solved.
Note: the fourth step is to refresh the permission-related table of MySQL. Don't forget that I didn't perform step 4 the first time, but I didn't succeed until I finally found this reason.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.