Skip to content

Instantly share code, notes, and snippets.

@oddlyspaced
Created February 28, 2021 14:40
Show Gist options
  • Save oddlyspaced/8856bd3db5132ef3714ecc40a9fe37ea to your computer and use it in GitHub Desktop.
Save oddlyspaced/8856bd3db5132ef3714ecc40a9fe37ea to your computer and use it in GitHub Desktop.
Step by step guide to properly install MySQL Server and MySQL-Workbench on Arch Linux and other based distributions like Manjaro etc.
# Part 0 - Updating system
sudo pacman -Syyu
# Part 1 - Installing software dependencies
sudo pacman -S git gnome-keyring
# Part 2 - Compile and Install MySQL Server
# (This might take like ~4 hours since it's compiling the source)
git clone https://aur.archlinux.org/mysql.git
cd mysql
makepkg -si
# Part 3 - Install MySQL-Workbench
sudo pacman -S mysql-workbench
# Part 4 - Setting up database
sudo rm -rf /var/lib/mysql
sudo mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysql
# ^ Once the above command is executed successfully, make sure to copy paste the demo password displayed at screen!
# Part 5 - Enabling the service
sudo systemctl enable --now mysqld
# Part 6 - Verifying
mysql -u root -p
# ^ Enter your dummy password from Part 4
# Part 7 - Loading up Workbench
# Launch MySQL Workbench from menu
It should display a local connection.
Right click and edit the connection and save your dummy password in the config from Part 4. (Next line for more refrence)
Make sure to click on "Store in Keychain" and generate a new keychain by setting up a password.
@Petunia0-oEscanor
Copy link

what would the dummy password be

@oddlyspaced
Copy link
Author

it is system generated as far as I remember

@A-Scode
Copy link

A-Scode commented Sep 24, 2024

greak work bro 👍

@TrainFan1804
Copy link

This worked very well. Thank you! 🐿️

@XhuyZ
Copy link

XhuyZ commented Oct 5, 2024

I've got this problem after makepkg -si "One or more PGP signatures could not be verified!".Do you have any solution?

@TrainFan1804
Copy link

I've got this problem after makepkg -si "One or more PGP signatures could not be verified!".Do you have any solution?

Open the PKGBUILD file with a text editor and look for the validpgpkeys section. Copy the fingerprint and then enter gpg --recv-keys FINGERPRINT into the terminal.

@oddlyspaced
Copy link
Author

I've got this problem after makepkg -si "One or more PGP signatures could not be verified!".Do you have any solution?

You can add --skippgpcheck as the command line parameter in the makepkg command if nothing else works. However do try to fix the makepkg issue, since pgp keys should be kept valid.

@XhuyZ
Copy link

XhuyZ commented Oct 7, 2024

I've got this problem after makepkg -si "One or more PGP signatures could not be verified!".Do you have any solution?

You can add --skippgpcheck as the command line parameter in the makepkg command if nothing else works. However do try to fix the makepkg issue, since pgp keys should be kept valid.

thank you it works

@XhuyZ
Copy link

XhuyZ commented Oct 7, 2024

I paste the system generated password and it shows "access denied for user 'root'@'localhost' (using password: yes)"

@XhuyZ
Copy link

XhuyZ commented Oct 7, 2024

I paste the system generated password and it shows "access denied for user 'root'@'localhost' (using password: yes)"

No need anymore I finally done the mysql installation.Thank you so much.

@ThamiRoneo
Copy link

thank you it works!!!

@miniMinn24
Copy link

I paste the system generated password and it shows "access denied for user 'root'@'localhost' (using password: yes)"

No need anymore I finally done the mysql installation.Thank you so much.

I'm now facing this issue, how did you fix it? can you share please?

@oddlyspaced
Copy link
Author

When you run the mysqld command check the output, it generates and prints a password there.

@miniMinn24
Copy link

When you run the mysqld command check the output, it generates and prints a password there.

Yep, I copied the password, and enter that password, still printing output like that.

@miniMinn24
Copy link

Yep, I copied the password, and enter that password, still printing output like that.

Finally, it works now, there was Mariadb installed and I forgot that was configured. I uninstalled everything and follow this instruction again. Thank you :D
But fyi, there's a warning message that is not supported and asking me to use MySQL workbench version 6.3

@PEPPEsant01
Copy link

how passwd change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment