Liunx-redhat系统安装mysql
下载安装文件
将下载文件复制到/usr/local下
# cd /usr/local
解压mysql
# tar -zvxf mysql-5.0.41-linux-i686-glibc23.tar.gz
重命名
# mv mysql-5.0.41-linux-i686-glibc23 mysql
# cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
添加mysql用户及用户组
# groupadd mysql
# useradd -g mysql mysql
修改mysql目录权限
# chown -R root /usr/local/mysql
# chgrp -R mysql /usr/local/mysql
# chown -R mysql /usr/local/mysql/data
生成mysql系统数据库
# /usr/local/mysql/scripts/mysql_install_db --user=mysql&
启动mysql服务
# /usr/local/mysql/bin/mysqld_safe --user=mysql&
如出现 Starting mysqld daemon with databases from /usr/local/mysql/data
代表正常启动mysql服务了, 按Ctrl + C 跳出
创建mysql数据库
[root@olivenan home]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 79
Server version: 5.0.41-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database freequery;
创建用户
mysql> grant all on *.* to freequery@"%" identified by "freequery"; 发布站程序下载:www.98youx.com发布站程序下载:www.98youx.com
将下载文件复制到/usr/local下
# cd /usr/local
解压mysql
# tar -zvxf mysql-5.0.41-linux-i686-glibc23.tar.gz
重命名
# mv mysql-5.0.41-linux-i686-glibc23 mysql
# cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
添加mysql用户及用户组
# groupadd mysql
# useradd -g mysql mysql
修改mysql目录权限
# chown -R root /usr/local/mysql
# chgrp -R mysql /usr/local/mysql
# chown -R mysql /usr/local/mysql/data
生成mysql系统数据库
# /usr/local/mysql/scripts/mysql_install_db --user=mysql&
启动mysql服务
# /usr/local/mysql/bin/mysqld_safe --user=mysql&
如出现 Starting mysqld daemon with databases from /usr/local/mysql/data
代表正常启动mysql服务了, 按Ctrl + C 跳出
创建mysql数据库
[root@olivenan home]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 79
Server version: 5.0.41-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database freequery;
创建用户
mysql> grant all on *.* to freequery@"%" identified by "freequery"; 发布站程序下载:www.98youx.com发布站程序下载:www.98youx.com
Tags:
作者:佚名评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论