您的当前位置:首页正文

门户网站系统搭建

2024-01-30 来源:好走旅游网


门户网站系统搭建

Mysql的安装:

tar –zxvf mysql-3.23.39.tar.gz

cd mysql-3.23.39

./configure –prefix=/usr/local/mysql 把mysql安装到/usr/local/mysql

make

make install

cd /usr/local/mysql/bin

./mysql_install_db

./usr/local/mysql/share/mysql/mysql.server start

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

./usr/local/mysql/bin/mysql 运行mysql改变root用户的密码、再增加一个mydb用户口令

为 123456

mysql>set password for root=password(‘121505’);

mysql>grant all privileges

mysql>on *.*

mysql>to mydb; /* grant all privileges on *.* to mydb identified by 'mydb' with grant option; */

mysql> set password for snoopy=password(‘123456’);

mysql> show databases;

+----------+

| Database |

+----------+

| mysql |

| test |

+----------+

2 rows in set (0.00 sec)

mysql> create database mydb

mysql>exit //退出mysql

设置自启动:

# cd /etc/rc.d/init.d

# cp /usr/local/mysql/share/mysql/mysql.server mysql

最后,运行chkconfig把MySQL添加到系统的启动服务组里面去。

# /sbin/chkconfig --del mysql

# /sbin/chkconfig --add mysql

因篇幅问题不能全部显示,请点此查看更多更全内容