当前位置:网站首页>Install MySQL 5.0 under Linux 64bit 6 - the root password cannot be modified

Install MySQL 5.0 under Linux 64bit 6 - the root password cannot be modified

2022-04-23 20:24:00 iBigder

Hello everyone , I am a 「Bigder」

Linux64Bit Lower installation MySQL5.6, This paper refers to @IDO Lao Xu's article

  • 1、 First, check the system's own Mysql, And uninstall the version
yum list installed |grep mysql

 picture

  • 2、 Unload the system mysql And its dependence , such as : step 1 Return results :mysql-libs.x86_64, This is my first time to install . step 1 No data , If yes, perform uninstall .
 yum -y remove mysql-libs.x86_64
  • 3、 download rpm package
wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm --no-check-certificate

 picture

  • 4、 Install the downloaded rpm
yum localinstall mysql-community-release-el6-5.noarch.rpm

 picture

  • 5、 Verify that the installation was successful
yum repolist all | grep mysql

 picture

  • 6、 install mysql service
[[email protected] ~]# yum install mysql-community-server

 picture

  • 7、 see mysql current state , Has not started
service mysqld status
[[email protected] ~]# service mysqld status
mysqld.service - SYSV: MySQL database server.
Loaded: loaded (/etc/rc.d/init.d/mysqld; bad; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
  • 8、 start-up MySQL
service mysqld start

 picture

  • 9、 Check it again mysql Service status ( Has been launched )
[[email protected] ~]# service mysqld start

 picture

  • 10、 see mysql5.6 The default password for , The password is empty.
 grep 'temporary password' /var/log/mysqld.log
  • 11、 Login in command line mode mysql , Change Password
mysql -u root -p

After entering the above command , Directly enter (5.6 edition 、 The default password is empty )

 picture

  • 12、 View the current database
show databases;

 picture

  • 13、 modify root password , I'm here root Password usage :「bigder#1314」

5.6 This version is used here alert user Command error

alter user [email protected] identified by "bigder#1314";

Change the following command to modify root password , Note that quotation marks are single quotation marks under English input method .

update mysql.user set password=PASSWORD('bigder#1314') where User='root';

 picture

Effective order modification

mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)

                                                                                                            Bigder                                       software test 、 Test management 、 In the workplace 、 Resume suggestion experience , Help to improve the comprehensive ability of primary testing posts .                        77 Original content                                                              official account  

14、 Create a new database 「Bigder」

create DATABASE Bigder;

 picture

  • 15、 Check whether the database is created successfully :

  • show DATABASE;
    

 picture

a Mysql5.6 All installed successfully , Try it, too ! Share and forward three times your salary !!!

above ,

Bigder

版权声明
本文为[iBigder]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204232017499749.html

随机推荐