Welcome, Guest. Please login or register.
April 19, 2014, 01:22:07 AM
Home Help Search Calendar Login Register
Show unread posts since last visit.
News: Let Pardus-Anka become #1: Pardus-Anka Bug ReportPardus-Anka World Google+ | The Pardus wiki  | Visit Pardus-Anka official website  | Register as forum member?  Email the moderator!

+  Pardus Worldforum
|-+  Assistance
| |-+  Software
| | |-+  LAMP
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Go Down Print
Author Topic: LAMP  (Read 4079 times)
Mailman
Pardus fellow craft
**
Posts: 61


View Profile
« on: September 10, 2007, 19:47:23 PM »

I am trying to install Apache, Mysql and Php wit the following commands:

$ sudo pisi update-repo
$ sudo pisi it apache mysql-server mod_php


and now

$ su
# mysql_install_db
# service mysql-server on

This all works out ok, until I have to set a password in Mysql


I am using the commands;
mysqladmin -u root password wachtwoord and
/usr/bin/mysqladmin -u root password wachtwoord

( I tried them both)

This command produces the next error message:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

Any help with this?

I also encounter a  404 message when I navigate to http://localhost/phpinfo.php and http://localhost/mysql

I DO get the right page when I navigate to http://localhost/phpmyadmin

Forgot: How do I set a password for Phpmyadmin?
Edit: I think I found the answer for this;
http://localhost/phpmyadmin/scripts/setup.php is the right link for the setup right?

I can't navigate to this link because php is not correctly setup I think. Am I right?
« Last Edit: September 10, 2007, 19:55:58 PM by Mailman » Logged
Kavani
Guest
« Reply #1 on: September 10, 2007, 19:55:55 PM »

I'm not sure about the Phpmyadmin part, but are you using 'su' when you're trying to set the password?
Logged
Mailman
Pardus fellow craft
**
Posts: 61


View Profile
« Reply #2 on: September 10, 2007, 20:04:10 PM »

When I try it with su /usr/bin/mysqladmin -u root password 'password'
or su mysqladmin -u root password 'password' I receive the following message:
Unknown id: mysqladmin
Logged
Eren.Turkay
Global Moderator
Pardus Master
*****
Posts: 262



View Profile WWW
« Reply #3 on: September 10, 2007, 20:27:24 PM »

$ service mysql on

This command makes the service start when your box is started, you should enter the command below to start service

$ service mysql start

To stop

$ service mysql stop

And if you don't want service to be started at startup, you can enter this command;

$ service mysql off

Also you can get help; $ service --help
Logged
Mailman
Pardus fellow craft
**
Posts: 61


View Profile
« Reply #4 on: September 10, 2007, 20:42:13 PM »

$ service mysql on

This command makes the service start when your box is started, you should enter the command below to start service

$ service mysql start

To stop

$ service mysql stop

And if you don't want service to be started at startup, you can enter this command;

$ service mysql off

Also you can get help; $ service --help

These are commands to start mysql when starting the computer right?

I am not sure how this should solve my problem? Can you please elaborate?
Logged
roverrat
Pardus Master
***
Posts: 236



View Profile
« Reply #5 on: September 10, 2007, 21:16:54 PM »

Mailman,

try the command *without* the quotes around the password, like this:

mysqladmin -u root password wachtwoord

Make sure mysql-server is running before you do this (service mysql-server start)


« Last Edit: September 10, 2007, 21:19:15 PM by roverrat » Logged
Mailman
Pardus fellow craft
**
Posts: 61


View Profile
« Reply #6 on: September 10, 2007, 21:38:16 PM »

Mailman,

try the command *without* the quotes around the password, like this:

mysqladmin -u root password wachtwoord

Make sure mysql-server is running before you do this (service mysql-server start)




mysqladmin -u root password password
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 checked and /var/run/mysqld/mysqld.sock' doesn't exist indeed
Logged
Mailman
Pardus fellow craft
**
Posts: 61


View Profile
« Reply #7 on: September 15, 2007, 19:11:01 PM »

Does anybody else have an idea?
Logged
Eren.Turkay
Global Moderator
Pardus Master
*****
Posts: 262



View Profile WWW
« Reply #8 on: September 15, 2007, 19:18:45 PM »

When you install apache, mysql-server and mod_php, you should start apache and mysql services, you can use default mysql user. Its "root" and password is nothing.

Start services via;

Code:
service mysql-server start
Code:
service apache start

And you will be able to use php and mysql.

You should re-enter these commands when your box is restarted. If you want these services to start when your box is boot. please enter;

Code:
service mysql-server on
Code:
service apache on

And if you don't want these services to start when your box is boot; you can disable it via;

Code:
service mysql-server off
Code:
service apache off

If you want to manage databases, get a last version of phpmyadmin and read install documents. That's alll Smiley
Logged
Mailman
Pardus fellow craft
**
Posts: 61


View Profile
« Reply #9 on: September 16, 2007, 19:35:14 PM »

Thanks Eren for your reply.

I gave the following commands:

TheMaster@pardus ~ $ service mysql-server start
TheMaster@pardus ~ $ service apache start

I assume the commands were succesful.
Now when I navigate to http://localhost/phpconfig.php I do receive a 404 page.
The same with http://localhost/mysql

These are the right paths to approach them right?

Btw, I assume Phpmyadmin is installed succesfully, as I get the login page of Phpmyadmin at http://localhost/phpmyadmin/
Logged
Eren.Turkay
Global Moderator
Pardus Master
*****
Posts: 262



View Profile WWW
« Reply #10 on: September 16, 2007, 19:47:17 PM »

Please make a dir in your home named "public_html" and copy your php files into it then you will be able to reach this via url; "http://localhost/~your-user-name/foo.php"

My username is eren, so I can reach my php scripts via "http://localhost/~eren", I think, your username is willem and try it out; "http://localhost/~willem"
Logged
Mailman
Pardus fellow craft
**
Posts: 61


View Profile
« Reply #11 on: September 17, 2007, 00:27:50 AM »

Thanks for the suggestion Eren.
What location are the php files stored currently?
I wouldn't have a clue...

Btw, my username is not willem..... Grin
Logged
Eren.Turkay
Global Moderator
Pardus Master
*****
Posts: 262



View Profile WWW
« Reply #12 on: September 17, 2007, 00:38:27 AM »

Ahh sorry, I was asleep when I wrote this Smiley It's easy, create a directory named "public_html" in your home and put your php files into it then run it by clicking "http://localhost/~username" I don't suggest putting php files into root directory "/var/www/localhost/htdocs" and use it wiht "http://localhost" directly.
Logged
Mailman
Pardus fellow craft
**
Posts: 61


View Profile
« Reply #13 on: September 17, 2007, 22:14:12 PM »

I think PHP is working now, but how do I approach Mysql and Phpmyadmin?

As far as I know they are installed succesfully:

pisi sr mysql-server
1 pakketten gevonden
[inst]    mysql-server - A fast, multi-threaded, multi-user SQL database server
[repo]    mysql-server - A fast, multi-threaded, multi-user SQL database server

pisi sr phpmyadmin
1 pakketten gevonden
[inst]      phpmyadmin - Browser based MySQL Admin Tool
[repo]      phpmyadmin - Browser based MySQL Admin Tool
Logged
roverrat
Pardus Master
***
Posts: 236



View Profile
« Reply #14 on: September 18, 2007, 12:30:34 PM »

Assuming your MySQL server is running you should now be able to access and manage your database though PhyMyAdmin.

Point your web browser to your web site and append /phpmyadmin/ to the path name like so (this is an example, replace it with the actual path of your setup:

 http://localhost/phpmyadmin/

Hope it helps,
cheers,
Alex
Logged
Pages: [1] 2 Go Up Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!