Nov 2

编译安装MySQL 不指定

felix021 @ 2011-11-2 17:38 [IT » 软件] 评论(0) , 引用(0) , 阅读(4257) | Via 本站原创 | |
$ tar zxf mysql-5.1.30.tar.gz
$ cd mysql-5.1.30
$ mkdir -p /home/fengmin/mysql
$ ./configure --prefix=/home/fengmin/mysql --with-plugins=all --with-pthread --with-charset=utf8 --with-extra-charsets=all
$ make -j4 &> make.log
$ make install
$ cd /home/fengmin/mysql
$ mkdir data
$ ./bin/mysql_install_db --datadir=/home/fengmin/mysql/data/
$ cp ./share/mysql/my-small.cnf my.cnf
$ vi my.cnf #修改各种配置
$ ./bin/mysqld_safe --defaults-file=/home/fengmin/mysql/my.cnf & #启动server
$ ./bin/mysqladmin -u root password 'newpassword' -h 127.0.0.1 -P 3306 #修改root密码

$ ./bin/mysql -h127.0.0.1 -P 3306 -u root -pnewpassword #连接mysql

$ ./bin/mysqladmin -h 127.0.0.1 -P 3306 -u root -pnewpassword shutdown #关闭server




欢迎扫码关注:




转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   *非必须
网址   电邮   [注册]