Posts

Showing posts with the label Phpmyadmin

Can Anyone Confirm That PhpMyAdmin AllowNoPassword Works With MySQL Databases?

Answer : Copy config.sample.inc.php to config.inc.php . In most cases you will find the config file on linux: /etc/phpmyadmin/config.inc.php on mac: /Library/WebServer/Documents/phpmyadmin/config.inc.php If you are trying to log in as root, you should have the following lines in your config: c f g [ ′ S e r v e r s ′ ] [ cfg['Servers'][ c f g [ ′ S er v er s ′ ] [ i]['user'] = 'root'; c f g [ ′ S e r v e r s ′ ] [ cfg['Servers'][ c f g [ ′ S er v er s ′ ] [ i]['AllowNoPassword'] = true; According to this: https://www.simplified.guide/phpmyadmin/enable-login-without-password This $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; should be added twice in /etc/phpmyadmin/config.inc.php if (!empty($dbname)) { // other configuration options $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; // it should be placed before the following line $i++; } // other configuration options $cf...

Converting VARCHAR To DECIMAL Values In MySql

Answer : Without Converting you can find Maximum using this query select max(cast(stuff as decimal(5,2))) as mySum from test; check this SQLfiddle your demo table: create table test ( name varchar(15), stuff varchar(10) ); insert into test (name, stuff) values ('one','32.43'); insert into test (name, stuff) values ('two','43.33'); insert into test (name, stuff) values ('three','23.22'); Your Query: For SQL Server, you can use: select max(cast(stuff as decimal(5,2))) as mySum from test; I think you need to try doing something like this on your MySQL if you have admin privilege on your MySQL. ALTER TABLE tablename MODIFY columnname DECIMAL(M,D) for the M,D variables, read this - http://dev.mysql.com/doc/refman/5.0/en/fixed-point-types.html And MySQL should be able to automatically converting a text to a numeric. Just that the data type in MySQL might not be a decimal yet that's why you can't store any decimal. Be aware that...