文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Installing MySQL

Installing MySQL

时间:2007-12-20  来源:xilen2099

1.creat account
$ pw groupadd mysql
$ pw useradd mysql -c "MySQL Server" -d /dev/null -g mysql -s /sbin/nologin

2.Compiling MySQL
$ ./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-unix-socket-path=/tmp/mysql.sock --with-mysqld-ldflags=-all-static   //在同一行
$ make
$ make install
$ strip /usr/local/mysql/libexec/mysqld //进入mysql目录后执行
$ scripts/mysql_install_db
$ chown -R root /usr/local/mysql
$ chown -R mysql /usr/local/mysql/var
$ chgrp -R mysql /usr/local/mysql

3.Copy configuration file
$ cp support-files/my-medium.cnf /etc/my.cnf
$ chown root:sys /etc/my.cnf
$ chmod 644 /etc/my.cnf

4.Start the server
$ /usr/local/mysql/bin/mysqld_safe &

5.Test the connection
Try to establish a connection with the database as follows:
$ /usr/local/mysql/bin/mysql -u root mysql
mysql> show databases;
mysql> quit;

6.shutdown the database
/usr/local/mysql/bin/mysqladmin -u root shutdown
相关阅读 更多 +
排行榜 更多 +
找茬脑洞的世界安卓版

找茬脑洞的世界安卓版

休闲益智 下载
滑板英雄跑酷2手游

滑板英雄跑酷2手游

休闲益智 下载
披萨对对看下载

披萨对对看下载

休闲益智 下载