In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article focuses on "the most commonly used use of mysql", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor to take you to learn "the most common use of mysql" bar!
1. To use mysql under shell, follow the method below.
$mysql-u
-p
Password:
Mysql > show databases; / / shows which databases are available
Mysql > create DATABASE lll; / / create a database named lll
Mysql > use lll; / / use a database named lll
Mysql > show tables; / / shows which tables are in the current database
Mysql > CREATE TABLE user (username TEXT not null, userpassword TEXT not null) / / create a table
Mysql > ALTER TABLE user ADD email TEXT not null; / / add a field to the current table
Mysql > ALTER TABLE test DROP come; / / discard a field from the current table
Mysql > ALTER TABLE test CHANGE pass pass LONGTEXT not null; / / change a field in the current table
Mysql > DROP TABLE user; / / discard a table in the current database.
2. Php3 code to realize the creation of database.
$dbc=mysql_connect ("localhost", "youruser", "yourpassword")
Mysql_create_db (zzz); / / create a database called zzz
Echo "success"
? >
3. Create a table using php3:
Dbc=mysql_connect ("localhost", "root", "")
Mysql_select_db ("zzz", $dbc)
Mysql_query ("CREATE TABLE user (username TEXT not null, userpassword TEXT not null)"); at this point, I believe you have a deeper understanding of "the most commonly used use of mysql". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.