就像Windows server 2003,2008中一般安裝的是Sql Server 數(shù)據(jù)庫(kù),在linux系統(tǒng)中一般安裝的是mysql數(shù)據(jù)庫(kù),而且Mysql數(shù)據(jù)庫(kù)的第一個(gè)版本就是發(fā)行在Linux系統(tǒng)上的。
我們?cè)诎惭b完mysql數(shù)據(jù)庫(kù)以后,會(huì)發(fā)現(xiàn)會(huì)多出一個(gè)mysqld的服務(wù),這個(gè)就是咱們的數(shù)據(jù)庫(kù)服務(wù),我們通過(guò)輸入 service mysqld start 命令就可以啟動(dòng)我們的mysql服務(wù)。
初始化 MySQL 數(shù)據(jù)庫(kù): WARNING: The host 'xiaoluo' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
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 xiaoluo 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!
[確定]
正在啟動(dòng) mysqld: [確定]
我們發(fā)現(xiàn)mysqld服務(wù)并沒(méi)有開(kāi)機(jī)自動(dòng)啟動(dòng),我們當(dāng)然可以通過(guò) chkconfig mysqld on 命令來(lái)將其設(shè)置成開(kāi)機(jī)啟動(dòng),這樣就不用每次都去手動(dòng)啟動(dòng)了
[root@xiaoluo ~]# chkconfig mysqld on
[root@xiaoluo ~]# chkconfig --list | grep mysql
mysqld 0:關(guān)閉 1:關(guān)閉 2:啟用 3:啟用 4:啟用 5:啟用 6:關(guān)閉