MySQL Database installation and configuration

Source: Internet
Author: User
Tags mysql create mysql create database mysql command line

http://blog.csdn.net/pipisorry/article/details/46773507

Download and install MySQL

Download MySQL Installer

Set up the admin account and password on the installation!

Note:

1. Dependency may not install MySQL Workbench (SQL integrated development environment) if it is not installed properly at local installation.

2. MySQL Installer is the + bit, but would install both and the bit binaries.

3. If the installation of MySQL is stopped at the start service and is not successful, please refer to the [Django build site record one ]



Start MySQL

Start the MySQL server

1. Windows taskbar MySQL icon > right-click > Running > Start

2. Start menu > All Programs > MySQL > MySQL notifier start notifier the MySQL icon will appear on the right side of the taskbar and start automatically

Starting the MySQL command line client client

Start menu > All Programs > MySQL > MySQL server 5.6 > MySQL command line client

Start the MySQL database service environment in Django

e:\mine\python_workspace\votesite>python manage.py dbshell

...

Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 2
Server Version:5.6.24-log MySQL Community Server (GPL)

...
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

Mysql>

Note: If the error is Python manage.py dbshell ' MySQL ' was not recognized as an internal or external command, operable prog because The MySQL path is not added to the system path. Added to it. E.g.c:\program files\mysql\mysql Server 5.6\bin\mysql.exe;

MySQL cannot be started and cannot change state

The service MYSQL56 was wasn't found in the Windows service
Solution:

Taskbar right MySQL icon > right-click > action > Manage monitored Items > services > Delete mysql, open instances page, delete instance > serv Ices > Add > Windows service > Mysql, it's OK!

What's the difference between Mysqld.exe and Mysql.exe?

Mysqld.exe is the MySQL daemon (i.e. MySQL server). To use a client program, the program must run because the client accesses the database by connecting to the server.
Mysql.exe is a command-line client tool that comes with MySQL, which is an interactive input SQL statement or a command-line tool that executes them from a file in batch mode.
To put it simply: mysqld is the command to start the MySQL database, and MySQL is the command to open and execute the SQL statement.

http://blog.csdn.net/pipisorry/article/details/46773507


Database files

Storage path for MySQL database files

If it is compiled and installed on Linux configure, specify--localstatedir=your_data_path;

If it is on window: MySQL data is stored by default in "$MySQL Installation path \data". e.g. datadir= "C:/programdata/mysql/mysql Server 5.5/data/"

Note:
1. Locate the MySQL installation path and open the My.ini file with Notepad.
2. Find the following in this document:
#Path to the database root
Datadir= "C:/programdata/mysql/mysql Server 5.6/data/"
If you want to view the content inside, use the database connection tool, or command line, through the Slelect and other statements can be queried.

MySQL CREATE database path for specified database
Method 1. If you want a database db_name does not exist here, you can store the default directory data under the database to create a file "Db_name.sym", where the content is where you want to store the path, such as "E:\mysql\data\db_name\", Make sure this folder exists.
Method 2. Modify the My.ini file to change the datadir= "C:/programdata/mysql/mysql Server 5.1/data/" to the path you want: D:\Data, first ensure that the path exists, and c:/programdata/ Mysql/mysql Server 5.1/data/The following MySQL folder is copied to d:/data/below. If you don't copy it, the MySQL service won't start. Restart the MySQL service to

Note:

1. C:\ProgramData\MySQL\MySQL Server 5.6 Directory with My.ini and My_2015-04-15t10-42-54. ini

2. C:\Program files\mysql\mysql Server 5.6 Directory has My-default.ini, requires administrator permissions to modify but also do not modify


MySQL syntax, special symbols, and the use of regular expressions

from:http://blog.csdn.net/pipisorry/article/details/46773507

Ref:http://www.linuxidc.com/linux/2013-07/88024.htm


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

MySQL Database installation and configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.