当前位置:网站首页>Installing MySQL version 5.5 database for Linux (centos6)

Installing MySQL version 5.5 database for Linux (centos6)

2022-06-12 01:50:00 I tested it first

Environmental preparation
Linux(CentOS)、 install MySQL5.5, I have found a lot of information on the Internet , All need to be verified one by one , Is the installation successful ,
Also welcome to verify and correct my installation steps ;

1、 To mysql Download from the official website mysql Compiled binary installation package , On the download page Select Platform: Option selection linux-generic, Then pull the page to the bottom ,64 Bit system download Linux - Generic (glibc 2.5) (x86, 64-bit),32 Bit system download Linux - Generic (glibc 2.5) (x86, 32-bit)

2、 decompression 64 position mysql Binary installation files : tar -xvf mysql-5.5.52-linux2.6-x86_64.tar.gz;

3、 Copy the decompressed mysql Directory to the local software directory of the system : Carry out orders :cp mysql-5.6.17-linux-glibc2.5-i686 /usr/local/mysql -r

Be careful : Don't add /

4、 Add system mysql Group and mysql user : Carry out orders :groupadd mysql and useradd -r -g mysql mysql

5、 mount this database :

 Enter the installation mysql Software Directory : Carry out orders  cd /usr/local/mysql

 Modify the current directory owner as mysql user : Carry out orders  chown -R mysql:mysql ./

 mount this database : Carry out orders  ./scripts/mysql_install_db --user=mysql

 Modify the current directory owner as root user : Carry out orders  chown -R root:root ./

 Modify the current data Directory owner is mysql user : Carry out orders  chown -R mysql:mysql data

6、 start-up mysql Service and add startup mysql service :

Add startup : Carry out orders cp support-files/mysql.server /etc/init.d/mysql, Put the startup script in the boot initialization directory

start-up mysql service : Carry out orders service mysql start

Carry out orders :ps -ef|grep mysql notice mysql Service description started successfully , Pictured

7、 modify mysql Of root User password ,root The initial password is empty : Carry out orders :./bin/mysqladmin -u root password ‘ password ’

8、 hold mysql The client is placed in the default path :ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql

Be careful : It is recommended to use soft chain in the past , Don't copy package files directly , Easy to install multiple versions of mysql

9_、 Use command , Give Way windows The remote access linux-MySQL database _

mysql>grant all privileges on *.* to [email protected]“%” identified by “root”;

// Make changes effective

mysql>FLUSH PRIVILEGES;

原网站

版权声明
本文为[I tested it first]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120143416623.html