Home Database Mysql Tutorial mysql免安装使用说明_MySQL

mysql免安装使用说明_MySQL

Jun 01, 2016 pm 01:40 PM
mysql Install

bitsCN.com
mysql免安装使用说明 1>把压缩文件mysql-noinstall-5.1.6-alpha-win32.zip解压到一个目录下,在环境变量中设置MYSQL_HOME,把%MYSQL_HOME%/bin 加入到 path。 2>创建my.ini配置文件,内容如下:[mysqld]#设置basedir指向mysql的安装路径basedir=.../mysqldatadir=.../mysql/data my.ini文件放在系统文件下面。 3>启动与停止mysqlmysqld.exe --install(安装windows服务,卸载使用mysqld.exe --remove )启动:net start mysql停止:net stop mysql   4>连接mysql格式: mysql -h主机地址 -u用户名 -p用户密码例1:连接到本机上的mysqlmysql -uroot -p例2:连接到远程主机上的mysqlmysql -h110.110.110.110 -uroot -pabcd123 5>退出mysql命令exit(回车)或者quit(回车) 6>修改密码格式:mysqladmin -u用户名 -p旧密码 password 新密码例:给root加个密码ab12。首先在DOS下进入目录mysqlbin,然后键入以下命令mysqladmin -uroot password ab12注:因为开始时root没有密码,所以-p旧密码一项就可以省略了。2、 例2:再将root的密码改为djg345。mysqladmin -uroot -pab12 password djg345下面的是mysql环境中的命令, 以分号作为命令结束 7>增加新用户格式:grant select on 数据库.* to 用户名@登录主机 identified by "密码";例1、增加一个用户test1密码为abc,让他可以在任何主机上登录, 并对所有数据库有查询、插入、修改、删除的权限。首先用以root用户连入mysql,然后键入以下命令:grant select,insert,update,delete on *.* to test1@"%"

Identified by "abc";例2、增加一个用户test2密码为abc,让其只可以在localhost上登录, 并可以对数据库mydb进行查询、插入、修改、删除的操作(localhost指本地主机, 即mysql数据库所在的那台主机),这样用户即使用知道test2的密码,也无法从internet上直接访问数据库,只能通过mysql主机上的web页来访问了。grant select,insert,update,delete on mydb.* to test2@localhost identified by "abc";   8>显示数据库列表show databases;9>显示库中的数据表use mysql;//数据库名称show tables;10>显示数据表的结构describe 表名;11>建库create database 库名;12>建表use 库名;create table 表名( ...... 参考相关文章: http://www.ej38.com/showinfo/mysql-107727.html 安装配置 http://dev.mysql.com/doc/refman/5.1/zh/sql-syntax.html MySQL语法
  bitsCN.com

Statement of this Website
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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP's big data structure processing skills PHP's big data structure processing skills May 08, 2024 am 10:24 AM

PHP's big data structure processing skills

How to optimize MySQL query performance in PHP? How to optimize MySQL query performance in PHP? Jun 03, 2024 pm 08:11 PM

How to optimize MySQL query performance in PHP?

How to use MySQL backup and restore in PHP? How to use MySQL backup and restore in PHP? Jun 03, 2024 pm 12:19 PM

How to use MySQL backup and restore in PHP?

What are the application scenarios of Java enumeration types in databases? What are the application scenarios of Java enumeration types in databases? May 05, 2024 am 09:06 AM

What are the application scenarios of Java enumeration types in databases?

How to insert data into a MySQL table using PHP? How to insert data into a MySQL table using PHP? Jun 02, 2024 pm 02:26 PM

How to insert data into a MySQL table using PHP?

How to fix mysql_native_password not loaded errors on MySQL 8.4 How to fix mysql_native_password not loaded errors on MySQL 8.4 Dec 09, 2024 am 11:42 AM

How to fix mysql_native_password not loaded errors on MySQL 8.4

How to use MySQL stored procedures in PHP? How to use MySQL stored procedures in PHP? Jun 02, 2024 pm 02:13 PM

How to use MySQL stored procedures in PHP?

Performance optimization strategies for PHP array paging Performance optimization strategies for PHP array paging May 02, 2024 am 09:27 AM

Performance optimization strategies for PHP array paging

See all articles