![]() ![]() This will create a user named “test_database_admin” identified by “test_password.” Now, grant that user permissions: GRANT ALL PRIVILEGES ON test_database TO do we do this? Well, you don’t want to just use your root user to access all your databases you want to separate them for security purposes. You can create a user like so: CREATE USER IDENTIFIED BY ‘test_password’ Once you have created a MySQL database, it’s usually a good idea to create a user for it. You may need to go back and run MySQL as a root user or use the root user to grant yourself the permission to create databases. If you get an error when you try to create a database, then you don’t have permission to create databases on the server. You can only use a single database at a time. ![]() ![]() USE is the command that MySQL uses to swap between databases. Before we can even do that, we need to use the database: USE test_database For the database to be populated, we need to add tables. | By Maven Analytics, John Pauler Explore Course Perfect for SQL beginners and first-time coders. Learn SQL database querying w/ MySQL Workbench. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |