DeveloperBreeze

Server Administration Programming Tutorials, Guides & Best Practices

Explore 48+ expertly crafted server administration tutorials, components, and code examples. Stay productive and build faster with proven implementation strategies and design patterns from DeveloperBreeze.

How to Grant MySQL Root Privileges for 127.0.0.1

Tutorial October 03, 2024
bash

When setting up a MySQL database, you may encounter an issue where the root user is only allowed to connect via Unix sockets (localhost), but not via TCP/IP (127.0.0.1). This tutorial walks you through resolving the Access denied for user 'root'@'127.0.0.1' issue by granting the proper privileges to the root user for TCP connections.

  • You must have root access to your MySQL server.
  • You need to be able to connect to MySQL via the command line using Unix socket (by default localhost).