Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

CentOS 6.6 MySQL 5.5.32 Green Edition installation configuration

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

MySQL 5.5.32 Green version installation configuration

Basic information

System version: CentOS 6.6

MySQL version: 5.5.32 green version

When initializing MySQL, there are two OK in × × part, indicating that the initialization is correct.

[root@lnmp02 tools] # useradd-s/sbin/nologin-M mysql

[root@lnmp02 tools] # tar zxvfmysql-5.5.32-linux2.6-x86_64.tar.gz

[root@lnmp02 tools] # mvmysql-5.5.32-linux2.6-x86_64 / application/mysql-5.5.32

[root@lnmp02 tools] # ln-s/application/mysql-5.5.32 / application/mysql

[root@lnmp02 application] # / application/mysql/scripts/mysql_install_db-- basedir=/application/mysql/--datadir=/application/mysql/data/-- user=mysql

Installing MySQL system tables...

OK

Filling help tables...

OK

To start mysqld at boot timeyou have to copy

Support-files/mysql.server tothe right place for your system

PLEASE REMEMBER TO SET APASSWORD FOR THE MySQL root USER!

To do so, start the server,then issue the following commands:

/ application/mysql//bin/mysqladmin-u root password' new-password'

/ application/mysql//bin/mysqladmin-u root-h lnmp02 password' new-password'

Alternatively you can run:

/ application/mysql//bin/mysql_secure_installation

Which will also give you theoption of removing the test

Databases and anonymous usercreated by default. This is

Strongly recommended forproduction servers.

See the manual for moreinstructions.

You can start the MySQL daemonwith:

Cd / application/mysql/; / application/mysql//bin/mysqld_safe &

You can test the MySQL daemonwith mysql-test-run.pl

Cd/application/mysql//mysql-test; perl mysql-test-run.pl

Please report any problems withthe / application/mysql//scripts/mysqlbug script!

Change the master and group to which / application/mysql belongs, cp configuration file, and change the path in the MySQL startup script

[root@lnmp02 ~] # chown-Rmysql.mysql / application/mysql/

[root@lnmp02 ~] # cp / application/mysql/support-files/my-small.cnf / etc/my.cnf

[root@lnmp02 ~] # sed-iSecretspromotionusrqlUnix _ localqlchangeApplicationOnApplicationSigg' / application/mysql/bin/mysqld_safe # modify the installation path in the script

[root@lnmp02 ~] # / application/mysql/bin/mysqld_safe & # start MySQL in the way of future processes

Check to see if MySQL starts normally

[root@lnmp02] # lsof-iRu 3306

[root@lnmp02 ~] # netstat-tulpn | grep 3306

[root@lnmp02 ~] # ps-ef | grepmysql

Configure environment variables

[root@lnmp02 ~] # echo "PATH=/application/mysql/bin:$PATH" > > / etc/profile

[root@lnmp02 ~] # source/etc/profile

[root@lnmp02 ~] # which mysql # determine if it is a green version of MySQL instead of the MySQL installed by yum

/ application/mysql/bin/mysql

Log in to MySQL

[root@lnmp02 ~] # mysql

Welcome to the MySQLmonitor. Commands end with; or\ g.

Your MySQL connection id is 3

Server version: 5.5.32 MySQLCommunity Server (GPL)

Copyright (c) 2000, 2013 Oracle and/or its affiliates. All rights reserved.

Oracle is a registeredtrademark of Oracle Corporation and/or its

Affiliates. Other names may betrademarks of their respective

Owners.

Type 'help;' or'\ h' for help.Type'\ c' to clear the current input statement.

Mysql >

Configure the traditional way to start MySQL

[root@lnmp02 ~] # cp/application/mysql/support-files/mysql.server / etc/init.d/mysqld

[root@lnmp02 ~] # sed-iaccountsinstaller mysql install path modify the mysql installation path by changing the mysql installation path

[root@lnmp02 ~] # killall mysqld # Kill the previously started mysql process

[root@lnmp02 ~] # lsof-imysql 3306 # confirm if the mysql process has been killed

[root@lnmp02 ~] # / etc/init.d/mysqld start # # restart the mysql process in the traditional way

Set the mysql administrator password. The default administrator is the root user

[root@lnmp02 ~] # mysqladmin-uroot password "123456"

[root@lnmp02 ~] # mysql-uroot-p123456 # Log in to mysql, note that there can be no spaces between-p and password

[root@lnmp02 ~] # mysqladmin-uroot-p123456 password "wangning" # change password

View error log

[root@lnmp02 ~] # cat / application/mysql/data/lnmp02.err # # the error log file is named after the hostname with the .err suffix

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report