Mar 4, 2010
Useful SQL commands for TYPO3/LAMP
Note that some commands are at the shell prompt (#) and some at the MySQL prompt (>). Set your root password after a fresh install:
# mysqladmin -u root password NEWPASSWORD
In SQL, create a new database as well as a new user
> CREATE DATABASE typo3;
> CREATE USER 't3user'@'localhost' IDENTIFIED BY 'passwd';
Select the database and grant privileges to your new user
> USE typo3
> GRANT ALL ON typo3.* TO 't3user'@'localhost' IDENTIFIED BY 'passwd';
Exit and reload the grant tables (not always necessary)
# mysqladmin -u root -p reload
Now see if it worked by logging in
# mysql -u t3user -p typo3
References