简体   繁体   中英

Cant configure LAMP on kali linux

Hello guys is me again now I have some problems configuring LAMP

first of all i have install everything but I cant run test.php to see if php works according to ifconfig command my addr is: 192.168.1.77 So in browser when I try to run 192.168.1.77/test.php nothing happens.I follow the instructions in this video to do that. How to set up a Debian LAMP Server

Second when I try to change the password on mysql I got this error by the way I can't do anything that has to do with mysql. when I run this command apache2 -v && mysql -v && php -v I got this error.

Server version: Apache/2.2.22 (Debian) Server built: Feb 1 2014 21:26:04 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

when I try to run this command /usr/bin/mysqladmin -u root password 'mypassword' i got this error.

/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

I follow this guide to LAMP, Linux Apache MySQL PHP But since I have those problems with mysql i can't finish the proper configuration. so thank you very much for any help or comments have and have a nice day.

Doing a quick search might be able to point you the right direction, did you install this?

apt-get install mysql-server

It seems to be complaining about mysqld which is the mysql-server program perhaps try this too:

service mysql start

You will see this:

[ ok ] Starting MySQL database server: mysqld ..
[info] Checking for tables which need an upgrade, are corrupt or were 
not closed cleanly..

Notice how it says mysqld

If that doesn't work try this maybe:

apt-get install --reinstall mysql-server

Hopefully this helps a bit

Kali blacklists services by default using sysvinit, so if you've been rebooting it could be tripping you up:

http://docs.kali.org/policy/kali-linux-network-service-policies

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM