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

How to install the MYSQL service

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to install the MYSQL service, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article.

System environment information

CentOS release 6.3 (Final)

VMware? Workstation 9.0.0 build-812388

Rpm installation package preparation

1 copy the following installation package from the CD to the specified directory

2 can also be downloaded to the local environment from the RPM resources website

Perl-DBI-1.609-4.el6.i686.rpm

Mysql-libs-5.1.61-4.el6.i686.rpm

Mysql-5.1.61-4.el6.i686.rpm

Perl-DBD-MySQL-4.013-3.el6.i686.rpm

Mysql-server-5.1.61-4.el6.i686.rpm

Directory name

/ usr/dev/mysql

Remove the original MYSQL service

Operation steps

# cd / usr/dev

# rpm-ivh perl-DBI-1.609-4.el6.i686.rpm

# rpm-ivh mysql-libs-5.1.61-4.el6.i686.rpm

# rpm-ivh mysql-5.1.61-4.el6.i686.rpm

# rpm-ivh perl-DBD-MySQL-4.013-3.el6.i686.rpm

# rpm-ivh mysql-server-5.1.61-4.el6.i686.rpm

# / usr/bin/mysql_install_db-user=mysql

# / usr/bin/mysqld_safe &

# / etc/init.d/mysqld status

Remarks

Command 7 means to initialize the MYSQL database this command is used to initialize the mysql database, that is, to create the / var/lib/mysql directory

Command 8 means to start the MYSQL service

Command 9 means to view MYSQL startup status

The following information is displayed after executing command 7

=

Installing MySQL system tables...

OK

Filling help tables...

OK

To start mysqld at boot time you have to copy

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

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER!

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

/ usr/bin/mysqladmin-u root password' new-password'

/ usr/bin/mysqladmin-u root-h localhost.localdomain password' new-password'

Alternatively you can run:

/ usr/bin/mysql_secure_installation

Which will also give you the option of removing the test

Databases and anonymous user created by default. This is

Strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

Cd / usr; / usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

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

Please report any problems with the / usr/bin/mysqlbug script!

=

The following information is displayed after executing command 8

=

Mysqld_safe Logging to'/ var/log/mysqld.log'.

Mysqld_safe Starting mysqld daemon with databases from / var/lib/mysql

=

The following information is displayed after executing command 9

=

Mysqld (pid 4200) is running...

=

Thank you for reading this article carefully. I hope the article "how to install MYSQL Services" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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