存档

文章标签 ‘mysql’

mysql OLD_PASSWORD’s problem

2008年8月25日 评论已被关闭

In my mysql slave and master’s
i meet a problem:
[MysqlDb.connectDB]java.sql.SQLException: Client does not support authentication protocol requested by server; consider upgrading MySQL client

this is a problem of mysql update version 4.1 and more!

to sovle it , we can do this

1st:
mysql> SET PASSWORD FOR
    -> ‘some_user’@’some_host’ = OLD_PASSWORD(‘newpwd’);
2nd:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD(‘newpwd’)
    -> WHERE Host = ‘some_host’ AND User = ‘some_user’;
mysql> FLUSH PRIVILEGES;

分类: database 标签:

二进制安装mysql的遇到的一些问题

2008年8月14日 评论已被关闭

据说使用Intel的CC编译器编译的mysql要比比gcc编译的性能高,所以可以下载这个版本的二进制mysql安装包

Linux (non RPM, Intel C/C++ compiled, glibc-2.3) downloads

MySQL is pleased to make available offerings of the MySQL Community Server
compiled with the Intel CC compiler. Internal tests show that editions of
the MySQL Community Server compiled with the Intel CC compiler exhibit
faster performance on Intel hardware than those compiled with the standard
gcc compiler. Feedback is welcome.

二进制方式安装mysql,默认安装目录为 /usr/local/mysql
所以需要修改相关配置。
如:mysql 安装在/home/mysql目录
可以编辑 /etc/my.cnf  增加:
basedir         = /home/mysql
datadir         = /home/mysql/data
启动mysql,这是如果提示:
/mysqld_safe: line 199: my_print_defaults: command not found
./mysqld_safe: line 204: my_print_defaults: command not found
The file /usr/local/mysql/bin/mysqld doesn’t exist or is not executable
Please do a cd to the mysql installation directory and restart
this script from there as follows:
./bin/mysqld_safe.
See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more
information
[1]+  Exit 1                  ./mysqld_safe
提示/usr/local/mysql/bin/mysqld 找不到
可以使出杀手锏:
ln -s /home/mysql/ /usr/local/mysql
另外在安装的时候
要在修改完my.cnf之后再执行
scripts/mysql_install_db –user=mysql

配置主从服务器中的问题
遇到了:
080814 12:01:22 [ERROR] Error reading packet from server: Could not find first log file name in binary log index file ( server_errno=1236)
080814 12:01:22 [ERROR] Got fatal error 1236: ‘Could not find first log file name in binary log index file’ from master when reading data from binary log
080814 12:01:22 [Note] Slave I/O thread exiting, read up to log ‘mysql-bin.024’, position 79

说明没有指定二进制log文件
解决方式:
解决
change master to \
master_log_file=’mysql-bin.000021′,\
master_log_pos=882
指定log_file即可。

分类: OpenSource 标签: