Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

wsl centos 8 mysql

/**
 * Install MySQL server (CentOS 8)
 */
sudo dnf install mysql-server

/**
 * Now MySQL was installed, but not running.
 * Start server
 */
sudo systemctl start mysqld.service

/**
 * If you need, you can enable MySQL starting when start WSL
 */
sudo systemctl enable mysqld

/**
 * Use the security script
 */
sudo mysql_secure_installation

/**
 * Can check your MySQL parameters
 */
mysqladmin -u root -p version

/**
 * Can run commands in MySQL after login
 */
mysql -u root -p

// Result:
// mysql> [Here you can run your queries, inserts, etc.]
 
PREVIOUS NEXT
Tagged: #wsl #centos #mysql
ADD COMMENT
Topic
Name
5+3 =