Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8739443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:56:19+00:00 2026-06-13T10:56:19+00:00

My Apache and mysql server are installed on the same linux server. In my

  • 0

My Apache and mysql server are installed on the same linux server.
In my mysql configuration file /etc/mysql/my.cnf, I have this line:

bind-address = 192.168.0.12

In my mysql database, I have a user db_user who can only connect from localhost

User     Server      Password   Global privileges  "Grant"
db_user  localhost   Yes        USAGE              No

What I don’t understand is: how can php connect to mysql tables with db_user and localhost domain if mysql is configured as binding only 192.168.0.12?

I checked the hosts file, localhost send to 127.0.0.1 and not 192.168.0.12.

And the other thing, this command on the server works :

mysql -udb_user -p”password” thedatabase

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:56:20+00:00Added an answer on June 13, 2026 at 10:56 am

    If you specify localhost as the host to connect to, MySQL will use a socket, and not a TCP connection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently installed xampp, followed the installation. MySQL/apache. (I have same website running on
I have had apache, php, and mysql server 5.5 installed locally and happily running
I have a LAMP (Linux/Apache/MySQL/Php) application that I should release soon. Even if I've
I have installed xampp on Windows7(64bit).I want to work with PHP, Apache and MySql.
I have a WAMP 2.0 server installed on Win XP . Apache version :
I have WAMP server installed in my PC. Apache Version : 2.2.17 PHP Version
I use Apache 2.2.22 and PHP 5.4.0 with MySQL 5.5.22. Installed the same page
i installed joomla,apache server,php,mysql in my pc, after that how to start developing web
I have just installed a MySQL server (version 3.23.58) on an old RedHat7. I
I installed XAMPP to run PHP from eclipse. I have a standalone MySQL server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.