Tag Info

Hot answers tagged

2

::1 is the ipv6 version of 127.0.0.1


2

You can do something like this: #! bin/bash selectvar="SELECT * FROM test;" mysql --user=root --password=mypass database << eof $selectvar eof


1

from the php 5.3 configure file: if test "$PHP_MYSQL" = "mysqlnd"; then PHP_MYSQLND_ENABLED=yes elif test "$PHP_MYSQL" != "no"; then MYSQL_DIR= MYSQL_INC_DIR= for i in $PHP_MYSQL /usr/local /usr; do if test -r $i/include/mysql/mysql.h; then MYSQL_DIR=$i MYSQL_INC_DIR=$i/include/mysql break ...


1

Editing the LSB init.d info header in an init.d script will not directly modify the start order and such. To make the system re-examine all init.d scripts and apply any changes you need to run the insserv command after editing.


1

If you want to replace \\ with \ with sed you just need to escape each of \, so for example: $ printf "%s\n" 'a\\b' a\\b $ printf "%s\n" 'a\\b' | sed 's/\\\\/\\/g' a\b But, frankly speaking it seems that in your case it would be better to correct mysql command, so I think this question is better suited to stackoverflow.com.


1

Depends on how you installed MySQL-python. If with "pip" no. If MySQL was installed you would have had to supply a user and password. I doubt you would forget either. Easiest method to check if MySQL is installed you will have a /etc/mysql/ directory. You can check the process list to check if MySQL is running with ps -ef | grep mysql. If it shows no ...


1

Sometimes you can clobber your configuration. As such, it's easier to start over, as if the package had never been installed. In your case, we are looking at MySQL. We use Yum to Remove MySQL, like so: yum remove mysql mysql-server With MySQL removed, we can safely backup the configuration: mv /var/lib/mysql /var/lib/mysql_old_backup If you'd rather ...


1

If you can get into MySQL when using the command: mysql -u root Then you already have access to MySQL, you will either not have a password set for the "root" user (most likely) or you may have a password set in a configuration file for MySQL such as /etc/my.cnf. If you want to reset your MySQL root password then you should be able to run: $ ...


1

To execute statements from the command line without an interactive prompt, use the -e option: mysql mydb -e 'select * from foo'


1

The address ::1 (or 0000:0000:0000:0000:0000:0000:0000:0001 with all fields written out) is an IP version 6 address and specifies the loopback address in host scope. So technically, it is the same as the IP version 4 address 127.0.0.1.



Only top voted, non community-wiki answers of a minimum length are eligible