What is MySQL database?
A database refers to a collection of organized data. In the case of a website, the data in question could range from posts and comments to usernames and their respective passwords. MySQL is a database management system. This means it helps you and other users store and retrieve different types of data from your website.
What makes My SQL so popular?
The total cost of ownership is low. This refers to the price of buying Oracle plus the cost of operating this program. Compared to most for-sale database programs MySQL is the cheapest option by far. Companies whose operations rely heavily on experimentation with apps and other web platforms spend less money using MySQL in the development of their products. This means that MySQL offers more value in the long run.
Its performance is refined. Its open-source nature has given rise to a cult-like following that reports bugs so as to provide solutions to bugs experienced in new releases of the year. Users are assured that the level of testing at MySQL headquarters has given rise to a product that honestly is the standard for database management.
Its scalability is high which refers to its ability to handle increasing amounts of work. Simple websites with little traffic may not need to worry much about this. As websites start to grow and receive higher traffic (hundreds, thousands, and even millions of views every day) as well as post much more content, they’ll need a more stable database manager to ensure everything is spic and span. MySQL fits the bill in this regard.
MySQL is user-friendly since MySQL was designed in such a way that even amateur web developers can figure out what to do without any issues. The quick wizards and the user guides will turn anyone into a MySQL Pro in no time. An added benefit is the fact that Oracle now owns MySQL. The experience and human capital from the tech giant, Oracle, combined with the input of MySQL community users assure users that the future updates will be elegant and powerful.
How to create a MySQL database?
Open a command line as an administrator from the apps menu.
Gain access to my SQL by logging in. You would need to have an account in advance.
user@server:~$ mysql -u mysql_user -p
Create the database by giving it a name
mysql > create database db_name;
Confirm that the database has been created with the instruction below
mysql > show databases;
Create a new user by giving them a name
mysql > create user db_user;
Give all privileges to the newly created user as well as assign a new password to them.
mysql > grant all on db_name.* to 'db_user'@'localhost' identified by 'db_password';
Cpanel is a web hosting program that uses icons and automated tools to make the process of web hosting simpler for both beginners and experienced webmasters.
Access your Cpanel area.
Select the MySQL databases option that is beside the MySQL database wizard option.
Before going any further, you will be required to create a database name. Choose your database name and click Create Database. The next screen will be one that affirms that a new database with the name you have chosen has been created. Click the ‘go back’ button so as to be returned to the page that enables you to define the settings of your new database.
Create a new user to enable you to access the database. Under ‘username,’ fill in the name you’d like to use for this user. Go ahead and create a secure login password for this particular user. If you have difficulty in coming up with a user, click on the password generator button. The program will generate a secure login password for you. Once you have filled in all the fields, click on the Create User button to save these settings.
After receiving confirmation that a new user has been created, click "go back" to get to the database settings area. Under the ‘Add User To Database’ section, fill in your previously created username. Under the database name, select the database name you’d like to register the user to in case you have more than one database.
The next pop-up window will request you to select the privileges you would like to award to each user. After selecting the privileges, you’d have to assign the user and click the ‘make changes’ button to complete the process of creating your MySQL database with Cpanel.
‘Wizards’ are programs with step-by-step procedures to help the less tech-savvy users to carry out tasks with much ease.
After opening Cpanel, select the MySQL database wizard under the database's area. It will walk through the same process covered above, but with detailed descriptions and prompts to help you complete the process.
Create a name for the new database. Select the Next Step button after entering the database name.
You should create a username for the new user to access the database. You will also have to create a password through which the user will gain access to the database. Alternatively, you can just click the Password Generator button to help you create a secure password for the user. Having created a username and user password, press the Create User button to save your settings.
The next step will require you to define the privileges assigned to the new user. Having selected all the privileges, you’d have to assign the privileges to the user and press the Next Step button for this purpose. You will receive a message confirming that your user has been added to the MySQL database.