![]() Once you switch to a database, you can create tables using the syntax below Ĭreate table (field1 datatype, field2 datatype) For instance, to switch to the database that you created above, use the command below: mysql> use test1ĭatabase changed MySQL Create Table Command ![]() You can switch from one database to another one in MySQL via the 'use' command. Remember to replace 'sample2' with the preferred name of your database. To create a database on your Alibaba MySQL server, use the command below: mysql> create database test1 You can run the command below to view the available databases on your Alibaba MySQL server mysql> show databases Ĥ rows in set (0.01 sec) MySQL Create Database Command You can also perform CRUD (Create Read Update and Delete) operations on any database table. Once you are connected to your MySQL database, you can execute SQL (Structured Query Language) commands to manage your MySQL instance including creating users, databases, tables, columns/fields. $ mysql -uroot .com -pĮnter your password when prompted and hit Enter to continue: Step 2: Managing your MySQL databases on the command line MySQL connection syntax when connected to ApsaraDB for RDS: MySQL connection syntax when connected to an ECS instance: Irrespective of your connection method and product type (ApsaraDB or ECS instance with MySQL server), the basic syntax for connecting to your MySQL is shown below: If you are running MySQL from an Alibaba ECS instance, you will need to SSH to it using your public IP address of the server.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |