Setting up a database:
- Create a database
- Create a user
- Create a table
- Create a column
- Create indexes
- Add foreign keys
Using the database:
- INSERT
- SELECT
- UPDATE
- DELETE
Learn how to build and use a common MariaDB (or MySQL) database with examples for phpMyAdmin as well.
Setting up a database:
Using the database:
CREATE USER IF NOT EXISTS 'db_user'@'%' IDENTIFIED BY 'user_password' PASSWORD EXPIRE NEVER; GRANT SELECT, INSERT, UPDATE, DELETE ON `db_name`.* TO 'db_user'@'%';Where
db_user
is the desired database user's name, user_password
is the user's password and db_name
is the database name that the user can access.