![]()
INSERT INTO products (product_id, product_name, category_name) VALUES ('3', 'MOUSE PAD', 'COMPUTER ACCESSORIES') ![]() INSERT INTO products (product_id, product_name, category_name) VALUES ('2', 'OPTICAL MOUSE', 'COMPUTER ACCESSORIES') You can now add a few products to the products table by executing the commands below one by one: INSERT INTO products (product_id, product_name, category_name) VALUES ('1', 'GAMING KEYBOARD', 'COMPUTER ACCESSORIES') Next, switch to the test_db database: USE test_db Ĭreate a products table to store sample records: CREATE TABLE products(product_id BIGINT PRIMARY KEY, product_name VARCHAR(50), category_name VARCHAR(50) ) ENGINE=INNODB Output: Query OK, 0 rows affected (0.01 sec) #Mysql stored procedure full#Grant the test_user full privileges to the test_db database GRANT ALL PRIVILEGES ON test_db.* TO Query OK, 1 row affected (0.01 sec) Guidelines for MySQL passwords: CREATE USER IDENTIFIED BY 'PASSWORD' Replace PASSWORD with a complex and unique value that follows the Output: Query OK, 1 row affected (0.01 sec)Ĭreate a database user and grant full access to the test_db database. mysql >Įnter the command below to create a test_db database: CREATE DATABASE test_db Next, you will see a MySQL prompt similar to the one shown below. ![]() You will be prompted to enter the root password of your MySQL database. Log into the MySQL server: mysql -u root -p You will also populate the table with sample data for testing purposes. You will start by creating a sample database, table, and user for accessing the database. Installation guides for MySQL are available for different distributions in our You may also wish to set the timezone, configure your hostname, create a limited user account, and harden SSH access.Ī MySQL server and client installed on the Linode server. #Mysql stored procedure update#Setting Up and Securing a Compute Instance guide to update your system. If you have not already done so, create a Linode account and Compute Instance.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |