当前位置:数据库 > MySQL >>

win32安装配置非安装版的MySQL

答案:环境变量设置:单击桌面我的电脑右键属性->高级->环境变量->双击Path项,添加C:\MySQL5.1.40\bin目录,如果要使用SDK开发,则要添加Lib和include目录到对应的Lib和include环境变量中;
环境变量设好,在开始菜单->运行->CMD,执行MySQLD,或是直接切换到C:\MySQL5.1.40\bin目录双击运行MySQLD.exe服务程序,也可以服务的形式运行: 注意mysql安装目录不要有中文或空格,在SDK开发中,如QT会有意想不到的问题;
安装服务 mysqld -install
启动服务 net start mysql
停止服务 net stop mysql
删除服务 mysqld -remove
再打开一个CMD窗口,执行MySQL -h localhost回车,就可以看到
{
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.40-community MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
}
表示成功连接到MySQL了数据库了,接下来,可以查看数据库,
->show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
2 rows in set (0.01 sec)
->use test;
Database changed

--可以支持常量表达式和MSSQL或Oracle的select 444+44 from dual一样;
mysql> select 444+44;
+--------+
| 444+44 |
+--------+
| 488 |
+--------+
1 row in set (0.00 sec)

上一个:MySQL数据库的23个注意事项
下一个:远程访问MySQL数据库的方法小结

Oracle
MySQL
Access
SQLServer
DB2
Excel
SQLite
SYBASE
Postgres
如果你遇到数据库难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,