Not Just Paranoid

Another site by Pete Maynard

MySQL Adding a database and table

Log in with a user which has the correct privileges

mysql> CREATE DATABASE port22;
Query OK, 1 row affected (0.00 sec)

Change to the new database.

mysql> use port22;
Database changed

Create a new table with an auto increment ID, password and email fields.

mysql> CREATE TABLE user (
    -> id TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
    -> pass VARCHAR(64),
    -> email VARCHAR(255)
    -> );
Query OK, 0 rows affected (0.00 sec)

18 Feb 2012 | Tags ( MySQL )

Website Last Updated on 4 Oct 2024 (CC BY-SA 4.0)

This site uses JQuery and nanogallery2 hosted by jsdelivr.net
for the Flickr photo feed and GoatCounter for user insights.