精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2010-04-19
最后修改:2010-04-19
SUSE SLES11 上安装配置mysql的笔记,分享并备忘。
Preparing... ########################################### [100%]
1:MySQL-server-community ########################################### [100%] mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h ss-server password 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. Please report any problems with the /usr/bin/mysqlbug script! Starting MySQL. done Giving mysqld 2 seconds to start
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
rpm -e MySQL-server-community-5.1.45-1.sles11
rpm -ivh --prefix=/work/soft/database/mysql/ MySQL-server-community-5.1.45-1.sles11.i586.rpm
error: package MySQL-server-community is not relocatable
./configure --prefix=/work/soft/database/mysql/mysql5.1 --localstatedir=/work/soft/database/mysql/mysqldata --with-charset=utf8 --with-extra-charsets=all --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-unix-socket-path=/work/soft/database/mysql/tmp/mysql.sock
checking for termcap functions library... configure: error: No curses/termcap library found
gunzip ncurses-5.7.tar.gz
tar xvf ncurses-5.7.tar cd ncurses-5.7/ ./configure make make install
Installing MySQL system tables...
OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /work/soft/database/mysql/mysql5.1/bin/mysqladmin -u root password 'new-password' /work/soft/database/mysql/mysql5.1/bin/mysqladmin -u root -h ss-server password 'new-password' Alternatively you can run: /work/soft/database/mysql/mysql5.1/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /work/soft/database/mysql/mysql5.1 ; /work/soft/database/mysql/mysql5.1/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /work/soft/database/mysql/mysql5.1/mysql-test ; perl mysql-test-run.pl Please report any problems with the /work/soft/database/mysql/mysql5.1/bin/mysqlbug script!
cp support-files/mysql.server /etc/init.d/mysql
chkconfig mysql on
export PATH=$JAVA_HOME/bin:$SOFT_ROOT/database/mysql/mysql5.1/bin:$PATH
alias mysql_start="mysqld_safe&" alias mysql_stop="mysqladmin -uroot -p shutdown"
ss-server:/etc # groupadd mysql
groupadd: Group `mysql' already exists. ss-server:/etc # useradd mysql -g mysql useradd: Account `mysql' already exists.
ss-server:/etc # ps -ef | grep mysql
root 3743 1 0 18:58 ? 00:00:00 /bin/sh /work/soft/database/mysql/mysql5.1/bin/mysqld_safe --datadir=/work/soft/database/mysql/mysqldata --pid-file=/work/soft/database/mysql/mysqldata/ss-server.pid mysql 3799 3743 0 18:58 ? 00:00:00 /work/soft/database/mysql/mysql5.1/libexec/mysqld --basedir=/work/soft/database/mysql/mysql5.1 --datadir=/work/soft/database/mysql/mysqldata --user=mysql --log-error=/work/soft/database/mysql/mysqldata/ss-server.err --pid-file=/work/soft/database/mysql/mysqldata/ss-server.pid
mysqladmin -u root password 'yourpassword'
mysql -uroot -p
然后输入上面设置的密码,登录后在mysql的命令行中执行: mysql>use mysql; mysql>delete from user where password=""; mysql>update user set host = '%' where user = 'root'; mysql>flush privileges; mysql>quit
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
浏览 5525 次