Some useful MySQL/MariaDB commands to create and provide access to a database.

Login to MariaDB with:

mysql.exe -u root -p <your-root-password>

If your root account doesn’t have a password omit the -p option.

Create database with:

create database database_name;

Grant all access to the user with:

grant …


This content originally appeared on DEV Community and was authored by Aashutosh Poudel

Login to MariaDB with:

mysql.exe -u root -p <your-root-password>

If your root account doesn't have a password omit the -p option.

Create database with:

create database database_name;

Grant all access to the user with:

grant all on database_name.* to 'root'@'localhost';

If you are logged in with a different user change root to your username accordingly.


This content originally appeared on DEV Community and was authored by Aashutosh Poudel


Print Share Comment Cite Upload Translate Updates
APA

Aashutosh Poudel | Sciencx (2022-03-27T04:25:26+00:00) Some useful MySQL/MariaDB commands to create and provide access to a database.. Retrieved from https://www.scien.cx/2022/03/27/some-useful-mysql-mariadb-commands-to-create-and-provide-access-to-a-database/

MLA
" » Some useful MySQL/MariaDB commands to create and provide access to a database.." Aashutosh Poudel | Sciencx - Sunday March 27, 2022, https://www.scien.cx/2022/03/27/some-useful-mysql-mariadb-commands-to-create-and-provide-access-to-a-database/
HARVARD
Aashutosh Poudel | Sciencx Sunday March 27, 2022 » Some useful MySQL/MariaDB commands to create and provide access to a database.., viewed ,<https://www.scien.cx/2022/03/27/some-useful-mysql-mariadb-commands-to-create-and-provide-access-to-a-database/>
VANCOUVER
Aashutosh Poudel | Sciencx - » Some useful MySQL/MariaDB commands to create and provide access to a database.. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/03/27/some-useful-mysql-mariadb-commands-to-create-and-provide-access-to-a-database/
CHICAGO
" » Some useful MySQL/MariaDB commands to create and provide access to a database.." Aashutosh Poudel | Sciencx - Accessed . https://www.scien.cx/2022/03/27/some-useful-mysql-mariadb-commands-to-create-and-provide-access-to-a-database/
IEEE
" » Some useful MySQL/MariaDB commands to create and provide access to a database.." Aashutosh Poudel | Sciencx [Online]. Available: https://www.scien.cx/2022/03/27/some-useful-mysql-mariadb-commands-to-create-and-provide-access-to-a-database/. [Accessed: ]
rf:citation
» Some useful MySQL/MariaDB commands to create and provide access to a database. | Aashutosh Poudel | Sciencx | https://www.scien.cx/2022/03/27/some-useful-mysql-mariadb-commands-to-create-and-provide-access-to-a-database/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.