on Linux
install mysql:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
on windows
mysql-noinstall-5.0.13-rc-win32安装
1.解压缩到一目录下,本例为F:/mysql
2.将F:/mysql/my-medium.ini复制到C:/windows, 改名为my.ini, 在[mysqld]下添加:
--------------------------------------------------------
# set basedir to your installation path
basedir=F:/mysql
# set datadir to the location of your data directory
datadir=F:/mysql/data
--------------------------------------------------------
3.在F:/mysql/bin下运行 mysqld-nt --install, 将mysql安装成windows的一个服务,启动
也可以通过运行F:/mysql/bin/mysqld-nt来启动mysqld-nt
4.由于在windows下,用mysql登录时,用的默认用户名是ODBC,所以如果像下面这样登录mysql服务器是不行的:
--------------------------------------------------------
>F:/mysql/bin/mysql
出错显示
F:/mysql/bin>mysql
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)
--------------------------------------------------------
必须这样登录
F:/mysql/bin>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 2 to server version: 5.0.13-rc-nt-log
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql> show databases;
+-------------------------+
| Database |
+-------------------------+
| information_schema |
| mysql |
| test |
+-------------------------+
3 rows in set (0.09 sec)