Mysql: how to create a database?
For storing and processing large quantitiesinformation is very convenient database in MySQL. Especially this system is necessary for those who are engaged in creation of sites. MySQL stores all information from the site in a special database.
Let's explore the MySQL server. How to create a database and how to connect it for further work? First you need to install MySQL on your computer. It can be placed using the command (manually), or through the "Package Manager". Once the server is installed, you can start creating the database. Now you need to contact MySQL. To do this, you need to start a line with all the necessary details. With the username - u (user name), with the name of the site where the site (host) is located - h. Then you need to know the password under which you registered, - the password of the user (password). As a result, the line to start will look like this: mysql -h hostname -u username - password = username_password.
Provided that all activities were prescribeda window will appear. There, enter the following command: "show character set;". Confirm the command with the "Enter" key. Now you need to enter or select the name of your database. Enter all database requisites.
How to create a database in MySQL? You will need the following command: "create database_name of the database (name) _character set_ requisites (set of corresponding symbols) collate_ default collation;". Select a name for the database and specify it in the field. This name must not exceed 64 characters. Enter the characters that define the contents of the database. If necessary, some characters can be replaced with utf8. This combination is a constant and supports many values. Confirm the creation of the database. If all the characters and commands are set correctly, you will be notified that the database was created.