In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
27 shut down the database using mysqladmin
Mysqladmin-uroot-poldboy123 shutdown
Ps-ef | grep mysql
28 mysql forgot the password to change the password process:
Mysql > mysqld_safe-- skip-grant-tables-- user=mysql-- defaults-file=/data/3306/my.cnf > / dev/null &
-> mysqld_safe-- skip-grant-tables-- user=mysql > / dev/null &
-> update mysql.user set password=password ("oldboy111") where user='root' and host='localhost'
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqld_safe-skip-grant-tables-user=mysql-defaults-file=/data/3306/my.cnf >' at line 1
Mysql > update mysql.user set password=password ("oldboy111") where user='root' and host='localhost'
Query OK, 1 row affected (0.35 sec)
Rows matched: 1 Changed: 1 Warnings: 0
Mysql > Terminated
Here, reopen a window to kill mysql attention! Never use kill-9 to kill mysql rudely, this will cause the database to lose data and the consequence will be very serious.
Ill mysql
[root@root ~] # pkill mysql
[root@root ~] # pkill mysql
[root@root ~] # pkill mysql
[root@root ~] # pkill mysql
[root@root ~] # pkill mysql
[root@root ~] # pkill mysql
[root@root ~] # pkill mysql
[root@root ~] # / etc/init.d/mysqld start
Starting MySQL.... SUCCESS!
[root@root ~] # ps-ef | grep mysql
Root 10974 10 18:39 pts/2 00:00:00 / bin/sh / application/mysql/bin/mysqld_safe-datadir=/application/mysql/data-pid-file=/application/mysql/data/root.pid
Mysql 11148 10974 3 18:39 pts/2 00:00:00 / application/mysql/bin/mysqld-basedir=/application/mysql-datadir=/application/mysql/data-plugin-dir=/application/mysql/lib/plugin-user=mysql-log-error=/application/mysql/data/root.err-pid-file=/application/mysql/data/root.pid
Root 11181 10136 0 18:39 pts/2 00:00:00 grep mysql
[root@root] # mysql-uroot-poldboy111
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 4
Server version: 5.6.34-log MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Mysql >\ Q
Bye
[root@root] # mysql-uroot-poldboy111
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 6
Server version: 5.6.34-log MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Mysql >
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.