Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql command line xampp ubuntu

/opt/lampp/bin/mysql -u root
Comment

run mysql xampp shell

mysql -u root mysql
Comment

command line mysql xampp

cd c:xamppmysqlin
mysql.exe -u root --password
Comment

connect xampp mysql on cmd windows

To access SQL via the command line we simply navigate to the xampp folder. the folder is usually on the c: drive.

type: cd c:xamppmysqlin then press enter.
type: in mysql -u root -p then press enter.
in the new line enter the password of the database.
type: show databases; to see all the databases that you have access to.
once you know what database you want to use type (ex. cms_database), type use cms_data or any other db_name, it should say Database changed
// Bonus Note you shouldn't use the root user when working with databases. you would want to create a separate account (ex. cms_user) with special privileges to limit errors.

to do that type:

GRANT ALL PRIVILEGES IN cms_database.*
TO 'cms_user'@'localhost' 
IDENTITIED BY 'yourpassword'
double check by using the command:

SHOW GRANT FOR 'cms_user'@localhost;
if you already have the name of the user and the specific database you wish to use, change step 2 to this.

mysql -u cms_user -p cms_database 
Comment

PREVIOUS NEXT
Code Example
Sql :: identify number of rows in sql 
Sql :: postgres delete all tables 
Sql :: sql cheat sheet pdf 
Sql :: sql drop default 
Sql :: mysql show table fields 
Sql :: oracle create table auto generated primary key 
Sql :: mysql update column default value CURRENT_TIMESTAMP error 
Sql :: database disk image is malformed sqlite fix ubuntu 
Sql :: mysql on update current_timestamp 
Sql :: postgres concat 
Sql :: how to extract year from date in sql 
Sql :: date format in postgresql 
Sql :: update query in sql server 
Sql :: sql stored procedure with output parameters 
:: inner join update 
::  
Sql :: mysql update join 
Sql :: sql views 
Sql :: alter table add multiple columns postgresql 
Sql :: DATE_SUB postgres 
Sql :: connexion mysql 
Sql :: oracle list grants on procedure 
Sql :: print hello world in plsql 
Sql :: sort by sql 
Sql :: docker create postgresql database 
Sql :: show column names in sql table 
Sql :: sql substring 
Sql :: postgres duplicate key value violates unique constraint already exists 
Sql :: postgres update multiple columns 
Sql :: postgres how to index a column 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =