LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   MYSQL (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-747899/)

smaj84_1 08-16-2009 06:21 AM

MYSQL
 
Hi friends!

I m using fedora...while installing MYSQL on the following step...

Create mysql config file: cp support-files/my-medium.cnf /opt/var/my.cnf

Is it necessary to copy this file? When I try to copy this I received this message:
[root@localhost support-files]# cp -p my-medium.cnf /opt/var/my.cnf
cp: cannot create regular file `/opt/var/my.cnf': No such file or directory



Please guide me.

ThinkFree 08-16-2009 06:29 AM

Are you sure /opt/var directory exists?

smaj84_1 08-16-2009 06:32 AM

Quote:

Originally Posted by ThinkFree (Post 3645198)
Are you sure /opt/var directory exists?

No, It does not exist...If I dont use this location then where I have to copy this file..

ThinkFree 08-16-2009 06:43 AM

Haven't installed from source, but MySQL reference manual says
Quote:

2.10.1. Source Installation Overview
The basic commands that you must execute to install a MySQL source distribution are:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> bin/mysqld_safe --user=mysql &
Means you have to copy the file in /etc/

ThinkFree 08-16-2009 06:44 AM

But why aren't you using yum or mysql rpm for installation?

smaj84_1 08-16-2009 06:49 AM

Quote:

Originally Posted by ThinkFree (Post 3645211)
But why aren't you using yum or mysql rpm for installation?

how i use yum for installing mysql? I want mysql to work with php

ThinkFree 08-16-2009 06:54 AM

Quote:

yum install mysql mysql-server
will install mysql client as well as mysql server.Add

yum install mysql mysql-server apache2 php
will let install LAMP

smaj84_1 08-17-2009 02:34 AM

Problem with MySQL
 
While I try to start mysql it says FAILED.Cant connect to local MYSQL server through socket mysql.sock

then I did this to find mysql.sock

[root@localhost lib]# locate mysql.sock
/var/lib/mysql/mysql.sock
[root@localhost lib]# cd /
[root@localhost /]# cd /var
[root@localhost var]# cd lib
[root@localhost lib]# cd mysql
[root@localhost mysql]# ls
Ali ib_logfile0 localhost.localdomain.err mysql
ibdata1 ib_logfile1 test

Why mysql.sock is not listed ? Where is it?

jrtayloriv 08-17-2009 03:04 AM

First of all, locate uses an index of your filesystem that is updated (usually via a cronjob) with updatedb. So /var/lib/mysql.sock did exist last time updatedb was run, which is why locate is finding it. But this doesn't mean that it exists now.

Second, you can just type cd /var/lib/mysql/ instead of cd'ing into each directory.

Finally, as far as mysql.sock, just restart your mysql service. Depending on your linux distro, you can do usually do this with one of the following commands:

1) /etc/init.d/mysqld restart

OR

1) /etc/rc.d/init.d/mysqld restart


If you tell us which distro you are using, we can tell you the exact command.

--jrtayloriv

centosboy 08-17-2009 04:26 AM

Quote:

Originally Posted by smaj84_1 (Post 3646142)
While I try to start mysql it says FAILED.Cant connect to local MYSQL server through socket mysql.sock

then I did this to find mysql.sock

[root@localhost lib]# locate mysql.sock
/var/lib/mysql/mysql.sock
[root@localhost lib]# cd /
[root@localhost /]# cd /var
[root@localhost var]# cd lib
[root@localhost lib]# cd mysql
[root@localhost mysql]# ls
Ali ib_logfile0 localhost.localdomain.err mysql
ibdata1 ib_logfile1 test

Why mysql.sock is not listed ? Where is it?

Are you starting mysql for the very first time??
have you recently upgraded it or made any changes??
This error should give you the exact path for the mysql.sock -

Code:

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


above is an example on my server when i upgraded, because the new version runs from somewhere else, so i would need to specify

Code:

--socket /path/to/mysql.sock


Code:

root      5039  0.0  0.1  4548  1296 ?        S    Jul06  0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid

smaj84_1 08-17-2009 04:33 AM

Thanks I have solved that issue..I have installed Wordpress and configured its wp-config-sample.pho file and renamed it to wp-config.php now I want to load WordPress directory files on my http:/192.168.129.108:port/ .... Sould I place all files of Wordpress's directory to htdocs? I m using fedora

centosboy 08-17-2009 05:33 AM

Quote:

Originally Posted by smaj84_1 (Post 3646227)
Thanks I have solved that issue..I have installed Wordpress and configured its wp-config-sample.pho file and renamed it to wp-config.php now I want to load WordPress directory files on my http:/192.168.129.108:port/ .... Sould I place all files of Wordpress's directory to htdocs? I m using fedora

was i of any help?? if yes, thank me with currency that is even better then $$$$$$ :)
a thumbs up....

centosboy 08-17-2009 05:39 AM

Quote:

Originally Posted by smaj84_1 (Post 3646227)
Thanks I have solved that issue..I have installed Wordpress and configured its wp-config-sample.pho file and renamed it to wp-config.php now I want to load WordPress directory files on my http:/192.168.129.108:port/ .... Sould I place all files of Wordpress's directory to htdocs? I m using fedora



taken from

Code:

codex.wordpress.org/Installing_WordPress
Code:

  Famous 5-Minute Install

Here's the quick version of the instructions, for those that are already comfortable with performing such installations. More detailed instructions follow.

  1. Download and unzip the WordPress package, if you haven't already.
  2. Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.
  3. Rename the wp-config-sample.php file to wp-config.php.
  4. Open wp-config.php in your favorite text editor and fill in your database details as explained in Editing wp-config.php to generate and use your secret key password.
  5. Place the WordPress files in the desired location on your web server:
          * If you want to integrate WordPress into the root of your domain (e.g. http://example.com/), move or upload all contents of the unzipped WordPress directory (but excluding the directory itself) into the root directory of your web server.
          * If you want to have your WordPress installation in its own subdirectory on your web site (e.g. http://example.com/blog/), rename the directory wordpress to the name you'd like the subdirectory to have and move or upload it to your web server. For example if you want the WordPress installation in a subdirectory called "blog", you should rename the directory called "wordpress" to "blog" and upload it to the root directory of your web server.

            Hint: If your FTP transfer is too slow read how to avoid FTPing at : Step 1: Download and Extract.
  6. Run the WordPress installation script by accessing wp-admin/install.php in your favorite web browser.
          * If you installed WordPress in the root directory, you should visit: http://example.com/wp-admin/install.php
          * If you installed WordPress in its own subdirectory called blog, for example, you should visit: http://example.com/blog/wp-admin/install.php

That's it! WordPress should now be installed.

so, yes, i guess you can install in your docroot

smaj84_1 08-17-2009 05:52 AM

Ok I have copy all files in htdocs directory...but now I m facing this problem

Warning: require_once() [function.require-once]: line number 76

and wp-config.php on line 76 is :

require_once(Mansoor/apache/htdocs/ '/wp-settings.php');

did I put somthing wrong in it?

jrtayloriv 08-17-2009 03:57 PM

Try this instead:
Code:

require_once(Mansoor/apache/htdocs/wp-settings.php);
--jrtayloriv


All times are GMT -5. The time now is 09:37 AM.