MySql Tutorial: CREATE database, table & INSERT VALUE How to create database and tables in MySql using the terminal on UBUNTU ... mysql -r root -p enter you password SHOW DATABASES; CREATE DATABASE name; USE database_name; CREATE TABLE name (fields and their data types); DESCRIBE table_name; INSERT INTO table_name VALUE(field values); SELECT * FROM table_name:
Run this bash script with sudo on your debian, ubuntu, linux mint and other debian based distros. install_mysql.sh #!/bin/bash # Exit immediately if a command exits with a non-zero status set -e # Define MySQL APT Config package URL and file MYSQL_APT_CONFIG_URL="https://dev.mysql.com/get/mysql-apt-config_0.8.33-1_all.deb" MYSQL_APT_CONFIG_DEB="mysql-apt-config_0.8.33-1_all.deb" # Update the package index echo "Updating package index..." sudo apt update -y # Download MySQL APT Config package if [[ ! -f "$MYSQL_APT_CONFIG_DEB" ]]; then echo "Downloading MySQL APT Config package..." wget "$MYSQL_APT_CONFIG_URL" -O "$MYSQL_APT_CONFIG_DEB" fi # Install the MySQL APT Config package echo "Installing MySQL APT Config package..." sudo dpkg -i "$MYSQL_APT_CONFIG_DEB" # Fix missing GPG keys (if any) echo "Updating package index again and fixing missing keys..." sudo...
Comments
Post a Comment