centos安装mysql以及mysql++开发环境
来源:互联网 发布:linux启动java服务 编辑:程序博客网 时间:2024/06/06 00:41
1>安装mysql服务器:
groupadd mysql
useradd -g mysql mysql
cd /usr/local
gunzip < /usr/local/mysql-5.0.41-linux-i686.tar.gz | tar xvf -
ln -s mysql-5.0.41-linux-i686 mysql
cd mysql
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
bin/mysqld_safe --user=mysql &
2>设置mysql自动启动
cp ./support-files/mysql.server /etc/rc.d/init.d/mysql
chmod +x /etc/rc.d/init.d/mysql
/sbin/chkconfig --level 3 mysql on
3>修改库的位置,使得编译mysql++时能找到mysql的类库
vim /etc/ld.so.conf
加入/usr/local/mysql/lib和/usr/local/lib
ldconfig
4>拷贝mysql的头文件
cp -R mysql/include/ /usr/include/mysql
5>编译安装mysql++
./configure
make
make install
6>使用mysql服务器
登录服务器:
mysql/bin>./mysql -u root -p
改密码:
use mysql
update user set Password=password('newpassword') where User='root';
flush privileges;
开放远程访问:
update user set host = '%' where user = 'root';
groupadd mysql
useradd -g mysql mysql
cd /usr/local
gunzip < /usr/local/mysql-5.0.41-linux-i686.tar.gz | tar xvf -
ln -s mysql-5.0.41-linux-i686 mysql
cd mysql
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
bin/mysqld_safe --user=mysql &
2>设置mysql自动启动
cp ./support-files/mysql.server /etc/rc.d/init.d/mysql
chmod +x /etc/rc.d/init.d/mysql
/sbin/chkconfig --level 3 mysql on
3>修改库的位置,使得编译mysql++时能找到mysql的类库
vim /etc/ld.so.conf
加入/usr/local/mysql/lib和/usr/local/lib
ldconfig
4>拷贝mysql的头文件
cp -R mysql/include/ /usr/include/mysql
5>编译安装mysql++
./configure
make
make install
6>使用mysql服务器
登录服务器:
mysql/bin>./mysql -u root -p
改密码:
use mysql
update user set Password=password('newpassword') where User='root';
flush privileges;
开放远程访问:
update user set host = '%' where user = 'root';
0 0
- centos安装mysql以及mysql++开发环境
- centos安装mysql以及mysql++开发环境
- CentOS安装mysql环境
- centos环境下安装mysql
- CentOS中MySQL开发环境的安装和应用[转帖]
- CentOS搭建php开发环境(安装apache,mysql,php)
- centos 7 如何安装mysql以及 mysql的c语言api环境
- CentOS安装python2.6以及MySQL-python
- centos 安装mysql以及打开对外开放
- centOs 开发环境,jdk,mysql,tomcat
- Centos环境下MySQL-python安装过程
- centos环境下如何安装Mysql数据库
- centos安装配置apache+php+mysql环境
- Linux---CentOS搭建环境之安装Mysql
- Centos/Ubuntu环境下安装mysql
- CentOS安装java环境(jdk+tomcat+mysql)
- CentOS环境下安装Apache+PHP+Mysql
- centos下安装nginx+mysql+php环境
- HDU4311 Meeting point-1(曼哈顿距离)
- equals和hashCode解析
- 【JavaScript】打印星型金字塔
- poj 2907 Collecting Beepers 邮递员问题暴力解法
- MFC 消息映射 消息传递MESSAGE_MAP 读深入浅出MFC感悟
- centos安装mysql以及mysql++开发环境
- jquery plugins demo
- Linux笔记_进程通讯——信号量
- LeetCode | #17 Letter Combinations of a Phone Number
- cocos3——7.使用UI的RichText
- java枚举和switch语法复习
- 获取当天时间信息
- 左旋字符串
- /etc/ld.so.conf文件