git clone https://aur.archlinux.org/packages/mysql
cd mysql
makepkg -si
sudo mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo mysql_secure_installation
sudo chown -R mysql:mysql /var/lib/mysql
sudo systemctl enable --now mysqld.service
sudo mysql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ##Run this file with the below command | |
| # powershell -ExecutionPolicy Bypass -File .\Install.ps1 | |
| ## Check if the script is already running with administrative privileges | |
| $isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | |
| # If not running as admin, re-launch the script with elevated privileges | |
| if ( -not $isAdmin) { | |
| # Build the new process start info | |
| $psi = New-Object System.Diagnostics.ProcessStartInfo |