1. configure the startup service/sbin/chkconfighttpdon [set the startup of the httpd service on the apache server]/sbin/chkconfig? Addmysqld [add mysql service in service list]/sbin/chkconfigmysqldon [set mysql service startup]/sbin/servicehttpdstart [
1. configure the startup service
/Sbin/chkconfig httpd on [set the startup of the httpd service on the apache server]
/Sbin/chkconfig? Add mysqld [add mysql service in service list]
/Sbin/chkconfig mysqld on [set mysql service startup]
/Sbin/service httpd start [start the httpd service, which has nothing to do with startup]
/Sbin/service mysqld start [start mysql service, irrelevant to startup]
2. set the password of the root account of the mysql database. The default initialization password is null ~~~
Mysqladmin-u root password 'new-password' [enter the password in quotation marks]
3. make mysql database more secure
Mysql-u root-p
Mysql> drop database test; [delete the test DATABASE]
Mysql> delete from mysql. user WHERE user = "; [deleting anonymous accounts]
Mysql> flush privileges; [reload permissions]
4. install mysql extension
Yum-y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
5. set the default encoding and other initial parameters (my. cnf)
Vi/etc/my. cnf
[Mysqld]
Datadir =/var/lib/mysql
Socket =/var/lib/mysql. sock
User = mysql
Default-character-set = utf8 [add]
Default-storage-engine = INNODB [add]
Old_passwords = 1
[Client]
Default-character-set = utf8 [add]
[Mysqld_safe]
Log-error =/var/log/mysqld. log
Pid-file =/var/run/mysqld. pid