在一电脑上安装多mysql实例
我的环境:
原有一mysql5.0实例,现新安装一mysql5.1,并将新的5.1实例的数据路径放在另一目录。
mysql5.1的my.ini如下
(配置my.ini的参考资料:
http://dev.mysql.com/doc/refman/5.1/en/option-files.html
http://downloads.mysql.com/docs/mysql-windows-excerpt-5.1-en.pdf
http://dev.mysql.com/doc/refman/5.0/en/multiple-windows-servers.html
关键是几个属性:
client组、mysqld组的port要不同;
mysqld组的basedir指示mysql的安装目录;
mysqld组的datadir、innodb_data_home_dir前者是数据的目录,后者是innodb的数据目录,两者必须相同,否则会报错如下:
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/error-creating-innodb.html
100515 20:50:51 [ERROR] Plugin 'InnoDB' init function returned error.
100515 20:50:51 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
100515 20:50:52 [ERROR] Unknown/unsupported table type: INNODB
100515 20:50:52 [ERROR] Aborting;
)
#------------------------------------------------------------------------------------------------------------
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows you should keep this file in the installation directory
# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To
# make sure the server reads the config file use the startup o
相关文档:
mysql字符集设置和查询问题(转)
2010-04-14 11:33
MySQL的字符集支持(Character Set Support)有两个方面:
字符集(Character set)和排序方式(Collation)。
对于字符集的支持细化到四个层次:
服务器(server),数据库(database),数据表(table)和连接(connection) ......
MySQL 字符串截取函数:left(), right(), substring(), substring_index()。还有 mid(), substr()。其中,mid(), substr() 等价于 substring() 函数,substring() 的功能非常强大和灵活。
1. 字符串截取:left(str, length)
mysql> select left('sqlstudy.com', 3);+-------------------------+| left('sqlstudy.com', 3) | ......
个人劳动,还请尊重,如若转载请注明出处。iihero@CSDN
看到有些朋友老问这个非安装版与安装版有什么区别(当然是windows平台)
干脆写了一个脚本自动为其创建mysql5服务。
脚本如下,将其放到解压以后的目录里边执行即可。
@echo off
echo "This is a demo script for auto installation of noninstall version o ......
mysql数值范围
tinyint -128~127 0~255
smallint -32768~32767 0~65535
mediumint -8388608~8388607 0~16777215
int -2147483648~2147483647 0~4294967295
bigint -9223372036854775808~9223372036854775807 0~18446744073709551615
java中
byte ......
/**********************by garcon1986***************************************/
错误代码如下:
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
$cd /etc/mysql
$mysql -u root -p
出现错误#1045
尝试了很多方法后,在网络上找到了解决方法。
$cd /etc/mysql
$gedit debian.cnf
找到 ......