Home > Database > Mysql Tutorial > body text

win7+mariadb免安装版

WBOY
Release: 2016-06-07 16:12:06
Original
2030 people have browsed it

1.官网下载mariadb-10.0.15-winx64.zip; 2.解压到D:/mariadb; 3.在D:/mariadb目录下新建一个my.ini文件,内容如下: [mysqld]basedir=D:\mariadbdatadir=D:\mariadb\datacharacter_set_server=utf8# 允许最大连接数max_connections=200# 创建新表时将使用

1.官网下载mariadb-10.0.15-winx64.zip;

2.解压到D:/mariadb;

3.在D:/mariadb目录下新建一个my.ini文件,内容如下:

[mysqld]
basedir=D:\mariadb
datadir=D:\mariadb\data
character_set_server=utf8
# 允许最大连接数
max_connections=200
# 创建新表时将使用的默认存储引擎
#default-storage-engine=INNODB 报错
#default-storage-engine=MYISAM
port=3306

federated#解决 [Note] Plugin 'FEDERATED' is disabled.
[client]
port=3306
default_character_set=utf8
#character_set_client=utf8 报错
[WinMySQLAdmin]
Server=D:\mariadb\bin\mysqld.exe
Copy after login

编码格式ANSI!不然会报错:...2003...内容没有留意

4.以管理员身份运行命令行;切换到D:/mariadb

运行:mysqld install MySQL --defaults-file=D:/mariadb/my.ini

运行:net start mysql

注:到这一步,应该不会有错误,如果没有成功。去D:/mariadb/data目录,有一个 你的主机名.err文件,看是哪里的错误。一般比较明显。可以google.

5.这时命令输入mysql,就进入mariadb了。但是没有mysql数据库,推出数据库,执行mysqladmin -u root -p password mima,下一步让输入password,直接enter(默认密码为空)。然后以mysql -u root -p登录,输入你设置的密码mima;

6.这时show databases;就有mysql数据库了。执行以下命令:update user set password=password('mima') where user='root';flush privileges;就更改了。

7.至此,mariadb告一段落。

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!