启动和关闭MySQL的方法
(1)启动
MySQL安装完成后启动文件mysql在/etc/init.d目录下,在需要启动MySQL服务时运行下面命令即可。 [root@test1 init.d]# /etc/init.d/mysql start
(2)停止
/usr/bin/mysqladmin -u root -p shutdown
(3)设置MySQL自动启动
1)察看mysql是否在自动启动列表中
[root@test1 local]# /sbin/chkconfig --list
2)把MySQL添加到你系统的启动服务组里面去
[root@test1 local]# /sbin/chkconfig --add mysql
3)把MySQL从启动服务组里面删除。
[root@test1 local]# /sbin/chkconfig -- del mysql
相关文档:
PHP手册上提供了以下一些主要的mysql数据库的支持函数:
mysql_affected_rows -- 取得前一次 MySQL 操作所影响的记录行数
mysql_change_user -- 改变活动连接中登录的用户
mysql_client_encoding -- 返回字符集的名称
mysql_close -- 关闭 MySQL 连接
mysql_connect -- 打开一个到 MySQL 服务器的连接
mysql_c ......
项目从mysql迁移到ORACLE中遇到移植问题,mysql中支持limit 而ORACLE say no .
解决方法 利用ORACLE的伪列 rownum来控制。。
Mysql : select * from table limit 10
equl
ORACLE: select * from table where rownum <= 10
ORACLE 伪列介绍:
随数据字典一起自动创建的一个表,属于sys模式,任何用户都可以访问,&nbs ......
MySQL client programs:
mysql
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 4.5.1, “mysql — The MySQL Command-Line Tool”.
mysqladmin
A client that performs administrative operations, such as crea ......
首先需要查看一下创建函数的功能是否开启:
X:\proper\mysql\bin>mysql -h localhost -u root -p
Enter password: **********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 5.0.22-community-nt-log
Type 'help;' or '\h' for help. Type ' ......
默认情况下Linux内的mysql数据库mysql.user表内的用户权限只是对localhost即本机才能登陆。所以需要更改权限,否则无法使用Mysql Administrator连接服务器,会发生如下所示的错误:
MySQL Administrator 1.1.9配置,连接mysql数据库
Could no ......