Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
52 events
when toggle format what by license comment
Sep 30 at 3:47 comment added Yuri Sucupira As mentioned before, you can run the whoami command at the Linux shell (terminal) to find out your username. If you prefer to add your username to mysql along with a password, enter the mysql shell as root with sudo mysql -p and then run create user 'my_username'@'localhost' identified by 'my_password'; where my_username is your Linux username (account name) and my_password is any password of your choice. If you already created your mysql user as a passwordless mysql account, run the previous command except that you must type alter instead of create. That's it.
Sep 30 at 3:40 comment added Yuri Sucupira On Ubuntu 24.04, I opened a shell (terminal emulator) window, logged as root in the mysql shell with the command sudo mysql -p and then created my passwordless user with the mysql shell command create user 'my_username'@'localhost' identified by ''; (replace my_username with your actual username, which you can find out with the Linux shell command whoami). Finally, I gave such user full mysql permissions with the mysql shell command grant all privileges on *.* to 'my_username'@'localhost';. Now exit mysql with the exit command, then type mysql and press Enter.
Mar 10 at 6:40 review Suggested edits
Mar 12 at 10:24
Feb 14 at 7:12 review Suggested edits
Feb 15 at 20:55
Dec 9, 2024 at 9:20 review Suggested edits
Dec 15, 2024 at 2:55
Jun 21, 2024 at 1:09 history left closed in review Mark Rotteveel
Markus Zeller
Adrian Mole
Original close reason(s) were not resolved
S Jun 17, 2024 at 15:16 review Reopen votes
Jun 21, 2024 at 1:09
Jun 17, 2024 at 15:11 history closed Nico Haase
Dalija Prasnikar
Not suitable for this site
Jun 16, 2024 at 13:06 review Close votes
S Jun 17, 2024 at 15:16
May 29, 2024 at 7:25 history edited Shadow
edited tags
Nov 6, 2023 at 12:26 answer added Daniel Opiyo timeline score: -1
Jul 31, 2022 at 5:50 answer added zep_ph timeline score: 1
May 11, 2022 at 14:08 answer added Jim Carnicelli timeline score: 1
Mar 13, 2022 at 22:02 answer added salvo720 timeline score: 3
Mar 1, 2022 at 5:07 answer added PYK timeline score: 15
Oct 14, 2021 at 17:31 answer added Christian Leyva timeline score: 1
Sep 21, 2021 at 18:09 history edited Peter Mortensen CC BY-SA 4.0
Removed the shell prompts to avoid confusion. Added a lead.
Aug 21, 2021 at 15:03 answer added Waterreedshimmer Dracchingan timeline score: 6
Aug 2, 2021 at 14:42 answer added mjj1409 timeline score: 0
May 21, 2021 at 21:17 answer added Shivansh Jagga timeline score: 1
Apr 7, 2021 at 11:19 answer added Fabrice Jammes timeline score: 0
Mar 15, 2021 at 16:02 answer added Grant Zvolsky timeline score: -1
Nov 17, 2020 at 21:14 comment added Jhon Didier Sotto For MySQL 8 use sudo mysql_secure_installation and set an strong password. Ref. Check step 5 of this tutorial phoenixnap.com/kb/how-to-install-mysql-on-ubuntu-18-04
Nov 15, 2020 at 3:39 answer added BR M timeline score: 3
Aug 10, 2020 at 7:22 answer added Douglas Hosea timeline score: 38
Jul 30, 2020 at 8:04 answer added amdg timeline score: 0
Jun 4, 2020 at 17:34 answer added VBW timeline score: -3
Dec 26, 2019 at 17:48 answer added Mike S timeline score: 4
Oct 16, 2019 at 3:17 answer added Mix Master Mike timeline score: 0
Sep 29, 2019 at 12:05 answer added AvahW timeline score: 145
Aug 26, 2019 at 23:57 answer added vitaly goji timeline score: 1
Aug 12, 2019 at 21:38 answer added Michael Ogala timeline score: 2
Aug 1, 2019 at 14:52 answer added Pico12 timeline score: 64
Jul 17, 2019 at 17:19 answer added klor timeline score: 14
Sep 11, 2018 at 21:48 answer added Amit Kumar timeline score: 22
May 9, 2018 at 21:58 comment added Scotty C. I know this is old, but want to say this for future visitors. Don't enter your mysql password, especially for root, in the command itself, or it will be stored in your shell history. Just leave the -p option by itself and mysql will prompt for a password.
Mar 22, 2018 at 3:23 comment added e-info128 Try remove if exists ~/.my.cnf file.
Mar 22, 2018 at 2:27 comment added e-info128 @clearlight Is not same question, this post is a problem with mysqladmin win super privilegies into mysql, the other post is a problem with a simple connection from socket.
Mar 7, 2018 at 22:09 vote accept Harsh Trivedi
Mar 3, 2018 at 4:42 answer added Blairg23 timeline score: 92
Feb 9, 2018 at 7:10 history protected CommunityBot
Jan 22, 2018 at 8:37 answer added Fab timeline score: 40
Oct 24, 2017 at 10:50 answer added svet timeline score: 1120
Jul 18, 2017 at 15:13 answer added Sadee timeline score: 9
May 12, 2017 at 20:38 answer added Colleen Purcell timeline score: 6
Jan 22, 2017 at 17:25 answer added Kishore Venkataramanan timeline score: 685
Jan 14, 2017 at 5:17 review Close votes
Jan 25, 2017 at 3:01
Jan 14, 2017 at 0:13 comment added clearlight Possible duplicate of Access denied for user 'root'@'localhost' (using password: YES) (Mysql::Error)
Jan 14, 2017 at 0:11 history edited clearlight CC BY-SA 3.0
deleted 81 characters in body; edited title
Jan 14, 2017 at 0:08 history edited Filburt
removed irrelevant tag
S Jan 14, 2017 at 0:06 review Triage
Jan 14, 2017 at 5:07
S Jan 14, 2017 at 0:06 history asked Harsh Trivedi CC BY-SA 3.0