New answers tagged

0

I believe the main point you're missing is: scripts (php or any other) do NOT connect to db liek to text files, they connect to db engine which is listening either on a tcp port (3306 for MySQL by default) or listening a socket. It means, it doesn't matter where your and db files are. Some hints: I believe /etc/mysql is a place for mysql config files ...


0

The MySQL way of changing password is SET PASSWORD SET PASSWORD FOR 'root' = PASSWORD('new_password'); see MySQL 5.7 Reference Manual / ... / SET PASSWORD Syntax The SET PASSWORD statement assigns a password to a MySQL user account, specified as either a cleartext (unencrypted) or encrypted value: 'auth_string' represents a cleartext ...


0

Mysql 5.6.21 is not GA release because of that will not available officially on site. you can try out on other source using source or binary or third party repository.if you are going with officially repository you will get GA version of Mysql.


0

If the repository has got no rpms for the specific version you need, one could try downloading the specific rpm through any of the numerous repositories readily available on the web and then use the rpm manager to install it as, rpm -ivh packagename.rpm


7

In MySQL 5.7, the password field in mysql.user table field was removed, now the field name is authentication_string. First choose the database: mysql> use mysql; And then show the tables: mysql> show tables; You will find the user table, and see its fields: mysql> describe user; You will realize there is no field named password, the ...


1

mysqladmin -u user-name password -p "oldpassword" "newpass" if you can login then try this "" wont work try '' single quote update user set password=PASSWORD("newpass") where User='ENTER-USER-NAME-HERE';


1

First run: aptitude -f install Then create mysql.list file : nano /etc/apt/sources.list.d/mysql.list add the following lines: deb http://repo.mysql.com/apt/debian/ wheezy mysql-5.6 deb-src http://repo.mysql.com/apt/debian/ wheezy mysql-5.6 Update and install mysql 5.6: apt-get update apt-get install mysql-server-5.6


0

PHP is trying to use different socket then the one on which MySQL is listening. To see on which socket is MySQL listening, run: mysqld --verbose --help|grep ^socket socket /var/run/mysqld/mysqld.sock To see what socket PHP tries to use, you can check output of script <?php phpinfo(); ?>, it is variable mysqli.default_socket. You can ...


1

I Solved the problem myself , the mistake was that i was not running it as adminstrator sudo mysql-workbench worked perfectly for me !


2

I found the problem, I've used tzselect to select my timezone, however, /etc/sysconfig/clock was with ZONE=America/New_York, causing a little mistake on system and apps that consuming system date/time info. To fix it, and keep bios clock synchonized with system's clock, did these steps: sudo vim /etc/sysconfig/clock ZONE="America/Sao_Paulo" UTC=true ARC=...


1

Those threads serve different purposes. There is a main thread that starts and waits until shutdown, there are several background threads in Innodb and Aria, and so on. Attach gdb and do thread apply all bt to see what they are doing - most likely they are sitting there doing nothing waiting for for some event to happen.


1

I discovered that this version of MySQL 5.7.x on ubuntu 16.04 is compiled using editline library not readline - Im pretty sure thats the problem.


0

You don't have to use column tool as your table is really done. Try using awk with the common delimiter |. You can do the following in your echo line echo "$output" | awk -F'|' '{print $5}' So it ends as #!/bin/bash while read -r output; do echo $output | awk '{print $5}' #do something done< <(mysql -u root -ptoor super_market -h 0 -e ...


0

This is a very dirty and hacky solution, but you can use the dot (.) as the separator since you have floating point numbers on each side. You can call awk as follows awk -F '.' '{a=gensub(/^[0-9]*\s*|\s*[0-9]*$/,"","g",$2); print a}' in the script and it shall print only the brand. There will be extraneous spaces in the middle of the brand names but you ...


1

output of mysql is tab delimited. column replaces tabs with spaces breaking your input. #!/bin/bash while read -r output; do # use double quotes with "$output" to avoid conversion # of tabs to spaces and set awk's Field Separator to "\t" echo "$output" | awk -F"\t" '{print $4}' #do something done< <(mysql -u root -ptoor super_market -...



Top 50 recent answers are included