mysqlNewbie Posted May 16, 2010 Share Posted May 16, 2010 I'm really new to this, but I do know my way a little around Linux. First, the versions of everything.... MySQL: 5.1.40 Apache: 2.2.15 Perl: 5.10.1 phpMyAdmin: 3.2.2.1 Mandriva: 2010 / 2.6.31.5 Kernel I'll admit, on some of this, I just blindly did the installs. Now, mySQL starts at boot-up. I didn't do this, it put the stuff into whatever init.d files it needed. I start X, and open up phpMyAdmin. I can connect, create tables, and everything seems to be working just fine. I type in http://127.0.0.1, and sure enough, it brings up the web page with "It works". Again, I didn't put this in the startup, but there it is, starting up nonetheless. I go to change: /usr/local/apache2/htdocs/index.html ...and refresh the page. No change. After poking around, I find out two things: 1. It's serving up the default page from the following location. This was (I think) done by MySQL and/or phpMyAdmin -- not sure who is doing it. /var/www/html/index.html 2. I have to manually start up my Apache server in: /usr/local/apache2/bin/ ...in order for my non-mySQL Apache server to start. Also, I have to switch the port, because the MySQL one is eating up port 80. So, here are my questions. 1. Can someone confirm if one of the following is happening? a. MySQL depends on Apache running, and it has its own server -- the one started at boot time b. phpMyAdmin depends on Apache running, and it has its own server -- the one started at boot time c. They both need Apache running, and they're getting their own server -- the one started at boot time d. Something else? 2. Because there are now two servers -- the one for my web page, and the other is for the DB stuff -- I won't be able to connect from my web page to the other. Is that true? 3. I would like to be able to not have this thing automatically start every time I boot the computer, but I don't know how to do this. I've pulled the files: /etc/init.d/httpd /etc/init.d/mysqld but then my bootup gets angry at me. And, I don't know how to start these things manually. And I don't know if they're running as services, or as daemons. Or even what's the right way. Help would sure be appreciated. Thanks!! Quote Link to comment https://forums.phpfreaks.com/topic/201906-help-starting-mysqlapache/ Share on other sites More sharing options...
trq Posted May 17, 2010 Share Posted May 17, 2010 Firstly, MySql and Apache have absolutley nothing to do with each other. One is a database server (MySql) and the other, a http server (Apache). Secondly, because phpMyAdmin is a web application it requires a http to run, it also requires a MySql server (obviosuly seeing as it is actually an interface to MySql). Now, a few things. The fact that /usr/local/apache2 exists leads me to believe you have attempted a manual install of Apache. Generally applications installed by a systems package manager end up within /usr not /usr/local. What steps did you take to install Apache? That is probably a good place for us to start, if you have manually installed it you should remove it and use your package manager to install applications. Also, when you say: I've pulled the files: /etc/init.d/httpd /etc/init.d/mysqld Does that mean you have deleted them? Not a good idea. You need those script to start the httpd (Apache) & mysqld (MySql) daemons. To stop these services from automatically starting at boot, you need to remove the symlinks to these script from the default runlevel. I'm not a Mandriva user, but you should find the default runlevel within /etc/rc3.d. Within there will be symlinks back to /etc/init.d/<somescript>, its these links you remove to remove a service / daemon from automatically starting at boot. To manually start a daemon, type: sudo /etc/init.d/<servicename> start to stop it: sudo /etc/init.d/<servicename> start Quote Link to comment https://forums.phpfreaks.com/topic/201906-help-starting-mysqlapache/#findComment-1059323 Share on other sites More sharing options...
cags Posted May 17, 2010 Share Posted May 17, 2010 Do you really use the start command to stop a daemon, or is that just a copy-paste/typo error? Quote Link to comment https://forums.phpfreaks.com/topic/201906-help-starting-mysqlapache/#findComment-1059426 Share on other sites More sharing options...
trq Posted May 17, 2010 Share Posted May 17, 2010 Ha! A copy and paste err. Quote Link to comment https://forums.phpfreaks.com/topic/201906-help-starting-mysqlapache/#findComment-1059435 Share on other sites More sharing options...
mysqlNewbie Posted May 18, 2010 Author Share Posted May 18, 2010 Yes, I did do a manual install of the Apache server. I didn't remove those files, just moved them. After I wasn't able to manually start everything, I put them back. I used the installer for phpMyAdmin, and that's what put all the /var/www files in place, including /var/www/phpmyadmin. Now, you said: Secondly, because phpMyAdmin is a web application it requires a http to run, it also requires a MySql server (obviosuly seeing as it is actually an interface to MySql). Are you saying that you need to have the Apache server running for phpMyAdmin-- httpd? Or is http something inside of mySQL that serves up the /var/www/phpmyadmin page, located at http://localhost/phpmyadmin/? Either way, my manual install of Apache wouldn't have an effect on the files in /var/www, because it didn't put them there. So, removing it won't make that go away, and because the manually installed server isn't the one being started at boot time, then that isn't impacted either. I'll still end up with an Apache server running at boot time, serving up some phpmyadmin files for mySQL. So, I guess the outstanding question right now is, does phpmyadmin require an apache server, or not? I could just as easily use the apache server that's being started up in the /var/www directory, I'm just trying to understand what it's doing there, who put it there, and why. Quote Link to comment https://forums.phpfreaks.com/topic/201906-help-starting-mysqlapache/#findComment-1059858 Share on other sites More sharing options...
trq Posted May 18, 2010 Share Posted May 18, 2010 Yes phpmyadmin requires a http server (Apache is a http server) to run. If you installed phpmyadmin via your package manager it likely pulled in Apache as a dependency and set it up for you which is why you should remove the one you installed manually. As for the files within /var/www. These are not part of the server per say, but this is generally where people put there various websites document roots. Quote Link to comment https://forums.phpfreaks.com/topic/201906-help-starting-mysqlapache/#findComment-1059878 Share on other sites More sharing options...
mysqlNewbie Posted May 22, 2010 Author Share Posted May 22, 2010 Works like a charm now. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/201906-help-starting-mysqlapache/#findComment-1061911 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.