Posts

Showing posts with the label Root

Access Denied For User 'root'@'localhost' (using Password: YES) - No Privileges?

Answer : If you have that same problem in MySql 5.7.+ : Access denied for user 'root'@'localhost' it's because MySql 5.7 by default allow to connect with socket, which means you just connect with sudo mysql . If you run sql : SELECT user,authentication_string,plugin,host FROM mysql.user; then you will see it : +------------------+-------------------------------------------+-----------------------+-----------+ | user | authentication_string | plugin | host | +------------------+-------------------------------------------+-----------------------+-----------+ | root | | auth_socket | localhost | | mysql.session | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost | | mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost | | debian-sys-maint | *497C3D7B50479A812B89CD12EC3...

Changing Root Password Does Not Change Sudo Password

Answer : You're changing root's password. sudo wants your user's password. To change it, try plain passwd , without arguments or running it through sudo . Alternately, you can issue: $ sudo passwd <your username> The password you use for sudo is the password of your own account, not the root account. sudo is used to grant you access to commands that need to be executed as root without giving you root access directly. To change your own password, use passwd without sudo.

ADB Root Is Not Working On Emulator (cannot Run As Root In Production Builds)

Answer : To enable root access: Pick an emulator system image that is NOT labelled "Google Play". (The label text and other UI details vary by Android Studio version.) Exception: As of 2020-10-08, the Release R "Android TV" system image will not run as root. Workaround: Use the Release Q (API level 29) Android TV system image instead. Test it: Launch the emulator, then run adb root . It should say restarting adbd as root or adbd is already running as root not adbd cannot run as root in production builds Alternate test: Run adb shell , and if the prompt ends with $ , run su . It should show a # prompt. Steps: To install and use an emulator image that can run as root: In Android Studio, use the menu command Tools > AVD Manager . Click the + Create Virtual Device... button. Select the virtual Hardware, and click Next . Select a System Image. Pick any image that does NOT say "(Google Play)" in the Target column. If you dep...

Can't Reset Root Password With --skip-grant-tables On Ubuntu 16

Answer : I found that the mysql.sock is deleted when the mysql service is stoped and mysqld_safe can't create it (I couldn't find the reason), so my solution was back up the sock folder and restore before start mysqld_safe Start server $ sudo service mysql start Go to sock folder $ cd /var/run Back up the sock $ sudo cp -rp ./mysqld ./mysqld.bak Stop server $ sudo service mysql stop Restore the sock $ sudo mv ./mysqld.bak ./mysqld Start mysqld_safe $ sudo mysqld_safe --skip-grant-tables --skip-networking & Init mysql shell mysql -u root Change password FLUSH PRIVILEGES; SET PASSWORD FOR root@'localhost' = PASSWORD('my_new_password'); For Ubuntu 19 with MySQL 8.0.17-0ubuntu2, what ended up working for me was a combination of many answers: In the MySQL's configuration file ( /etc/mysql/mysql.conf.d/mysqld.cnf on my machine), under [mysqld] , add: skip-grant-tables = 1 plugin-load-add = auth_socket.so Restart the ...