![]() \show query insert into url (link, added,modify,status) values (‘’, NOW(),NOW(),1) I am using the following command to add one line of data to our table. VARCHAR – mean this will hold a string value.Ĭool, we have a table that we can now start to add some date.\show query create table url (link VARCHAR(100), added DATE, modify DATE, status int) ![]() Let’s run the command to create our table: Status – Current status of the link, can be 1-active, 2-disable, 3-deleted.Modify – The date that link changed, or removed.The table will contain the following URL information: For the use of our guide, we will create a table to store basic information about URL. To add a table to the database, you need first to think about what you want to store in that table and to design it. Once the database is ready, we need to tell MySQL that we want to use this database. ![]() After running that command you will have a new ready to use, an empty, database named openport. The above command tells MySQL to create a new database name openport. To create a new database, we need to run the following command: Use the password we enter during the installation process of MySQL. \connect –mx will prompt you for the password, insert the password and press enter. Next, you need to connect to the database, run the following command: To connect the database, you can use the MySQL command. MySQL command-line shell Connecting to the database: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |