CentOS 5.10系统上安装MySQL 5.5.2数据库_cad数据恢复
日期:2014-07-13 / 人气: / 来源:网络
使用CentOS的话可以:
yum -y install gcc
yum -y install gcc-c
3、如果还没有mysql用户,创建:
4、修改目录权限:
5、创建数据目录(mysql5.5默认已经没有data目录了)
6、从源安装目录拷贝文件
7、初始化数据库:
8、安装完成。初始密码都为空。
9、添加环境变量
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/data/mysql/bin
export PATH
unset USERNAME
###################################修改密码的方式:
/data/mysql/bin/mysqladmin -u root password '123456'其中引号内的
第二种更改密码的方式:
# mysql -u root mysql
mysql>use mysql;
mysql>desc user;
mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root"; //为root添加远程连接的能力。
mysql>update user set Password = password('xxxxxx') where User='root';
mysql>select Host,User,Password
mysql>flush privileges;
mysql>exit
注:红色password为mysql的加密方式。在user表中保存的密码非明文,而是以*开头的一串加密的字符串,切记直接将明文密码直接update到数据库。否则,登录会提示ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)。
CentOS 6.3系统如何安装MySQL 5.5.29数据库
安装方式分为rpm和源码编译安装两种,本文是采用mysql源码编译方式,编译器使用Cmake。软件需要mysql-5.5.29.tar.gz和cmake-2.8.10.2.tar.gz,请自行下载。下载地址:http://mysql.mirror.kangar
MySQL数据库
作者:管理员
推荐内容 Recommended
- 江苏飞浩信息科技期待您的加入07-20
- 江苏飞浩科技欢迎您07-19
相关内容 Related
- 江苏飞浩信息科技期待您的加入07-20
- 江苏飞浩科技欢迎您07-19