
Steve Obi-Wan Larry Kenobi is a Jedi junky responsible for the destruction of Saint Jabba’s Hospital For the Survivors of the Singularity Engine.
Steve Obi-Wan Larry Kenobi is a Jedi junky responsible for the destruction of Saint Jabba’s Hospital For the Survivors of the Singularity Engine.
… so far, not too impressed. The story telling is choppy. A lot of filler content with a thin story line.
mysql -u username -p
Prompts for a password.
mysql -u username -p -D database_name
SHOW DATABASES;
USE database_name;
SHOW TABLES;
DESCRIBE table_name;
SELECT USER();
SELECT DATABASE();
SHOW PROCESSLIST;
SHOW FULL PROCESSLIST;
EXIT;
CREATE DATABASE database_name;
CREATE TABLE table_name (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
age INT
);
INSERT INTO table_name (name, age) VALUES ('John', 30);
SELECT * FROM table_name;
UPDATE table_name SET age = 31 WHERE name = 'John';
DELETE FROM table_name WHERE name = 'John';
DROP TABLE table_name;
.sql
FilesTo load and execute an SQL file that contains queries or database structure (e.g., schema.sql
or data.sql
):
mysql -u username -p
USE database_name;
SOURCE /path/to/your/file.sql;
You can execute the SQL file directly from the command line without entering the MySQL prompt:
mysql -u username -p database_name < /path/to/your/file.sql
This method runs the .sql
file directly into the specified database.
SHOW FULL PROCESSLIST;
to view running queries, especially helpful for debugging long-running queries. SELECT VERSION();
SET GLOBAL general_log = 'ON';
to start logging all queries. To view the log, check the path from the following: SHOW VARIABLES LIKE 'general_log_file';
These commands and tips should help you navigate MySQL efficiently!
PHP, Ubuntu Desktop, and WordPress… and I’m perfectly happy with that.
Fight me.
Trying out running Ubuntu on my mid-2015 MacBook Pro. Except for some quirks (and some lag, due to…well, the os being mounted from a thumb drive), it’s remarkably enjoyable.
sudo dpkg -r google-chrome-stable
.sudo rpm -e google-chrome-stable
.