Home >Database >Mysql Tutorial >win32安装配置非安装版的MySQL_MySQL

win32安装配置非安装版的MySQL_MySQL

WBOY
WBOYOriginal
2016-06-01 13:20:051002browse

bitsCN.com 环境变量设置:单击桌面我的电脑右键属性->高级->环境变量->双击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)bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn