EzDevInfo.com

adminer

Database management in a single PHP file Adminer - Database management in a single PHP file adminer (formerly phpminadmin) is a full-featured database management tool written in php. conversely to phpmyadmin, it consist of a single file ready to deploy to the target server. adminer is available for mysql, postgresql, sqlite, ms sql, oracle, firebird, simpledb, elasticsearch and mongodb.

How to export part of a table as SQL in Adminer?

In Adminer, I can export whole tables with the "Export" menu option. When I enter a query, I can export the results as .CSV or .TSV, but not as SQL.

Is there any option to do so? A plugin or a config switch?

enter image description here


Source: (StackOverflow)

Session expired, please login again

I am using

Adminer 4.1.0 in Wordpress Plugin

OS is Ubuntu

Webserver is Nginx

The day before yesterday, my adminer is working properly. But yesterday i cannot login because it's returning an error message:

Session expired, please login again.

I searched google but i couldn't find any solution. Please help. What should i check? Thank you.


Source: (StackOverflow)

Advertisements

How to export database with Adminer?

It's the first time i use ADMINER.

I want to export the database and i'm not sure to set correctly the parameters.

The database is in production and i don't want to make any mistakes.

See screenshot :

enter image description here

What are the correct parameters for :

1) Database : Use, drop + create, Create, Create + alter

2) Table : drop + create, Create, Create + alter

3) Datas : Truncate + insert, insert, insert+ update


Source: (StackOverflow)

Re-ording the display order of tables in MySQL

This is purely for convenience.

New tables are added to the bottom of the list of tables when using Adminer (http://www.adminer.org/) - how can I make these tables appear at the top of the list?

These tables are my own and not part of the CMS I use, therefore I use them a lot and need to look at them a lot. With 170 tables this is annoying having to scroll through them all to get to mine.

How can I make Adminer or MySQL reorder these tables?


Source: (StackOverflow)

Why is a vagrant box configured by puhphet failing to provision adminer?

So on two separate puphpet generated boxes, my vagrant up command errors out complaining that:

==> default: Notice: /Stage[main]/Puphpet_apache/Exec[exec mkdir -p /var/www/html/adminer @ key av_25nh1hek8155]/returns: mkdir: cannot create directory `/var/www/html/adminer': Permission denied
==> default: Error: mkdir -m 775 -p /var/www/html/adminer returned 1 instead of one of [0]
==> default: Error: /Stage[main]/Puphpet_apache/Exec[exec mkdir -p /var/www/html/adminer @ key av_25nh1hek8155]/returns: change from notrun to 0 failed: mkdir -m 775 -p /var/www/html/adminer returned 1 instead of one of [0]

Within the box, /var/www/html is owned by root:root which I suspect is causing the problem however: this only happens on my OS X machine. One of the boxes vagrant up's fine with no issues on my work linux machine.

My puphpet config is below, but nothing in particular has been configured for adminer has been specified via puphpet, I just enabled the install and left it at it's defaults.

vagrantfile:
    target: local
    vm:
        box: puphpet/ubuntu1204-x64
        box_url: puphpet/ubuntu1204-x64
        hostname: pathwaytothepark.mb
        memory: '2048'
        cpus: '1'
        chosen_provider: virtualbox
        network:
            private_network: 192.168.56.101
            forwarded_port:
                vflnp_3fusi4x2qxhk:
                    host: '9210'
                    guest: '22'
        post_up_message: ''
        provider:
            virtualbox:
                modifyvm:
                    natdnshostresolver1: on
                showgui: '0'
            vmware:
                numvcpus: 1
            parallels:
                cpus: 1
        provision:
            puppet:
                manifests_path: puphpet/puppet
                manifest_file: site.pp
                module_path: puphpet/puppet/modules
                options:
                    - '--verbose'
                    - '--hiera_config /vagrant/puphpet/puppet/hiera.yaml'
                    - '--parser future'
        synced_folder:
            vflsf_jqcbuxvtafze:
                source: ./
                target: /var/www/project
                sync_type: nfs
                smb:
                    smb_host: ''
                    smb_username: ''
                    smb_password: ''
                rsync:
                    args:
                        - '--verbose'
                        - '--archive'
                        - '-z'
                    exclude:
                        - .vagrant/
                        - .git/
                    auto: 'true'
                owner: www-data
                group: www-data
        usable_port_range:
            start: 10200
            stop: 10500
    ssh:
        host: null
        port: null
        private_key_path: null
        username: vagrant
        guest_port: null
        keep_alive: true
        forward_agent: false
        forward_x11: false
        shell: 'bash -l'
    vagrant:
        host: detect
server:
    install: '1'
    packages: {  }
users_groups:
    install: '1'
    groups: {  }
    users: {  }
firewall:
    install: '1'
    rules: {  }
cron:
    install: '1'
    jobs: {  }
nginx:
    install: '0'
    settings:
        default_vhost: 1
        proxy_buffer_size: 128k
        proxy_buffers: '4 256k'
    upstreams: {  }
    vhosts:
        nxv_jtsfal7p36m0:
            server_name: awesome.dev
            server_aliases:
                - www.awesome.dev
            www_root: /var/www/awesome
            listen_port: '80'
            index_files:
                - index.html
                - index.htm
                - index.php
            client_max_body_size: 1m
            ssl: '0'
            ssl_cert: ''
            ssl_key: ''
            ssl_port: '443'
            ssl_protocols: ''
            ssl_ciphers: ''
            rewrite_to_https: '1'
            spdy: '1'
            locations:
                nxvl_i3za4rt0acnp:
                    location: /
                    autoindex: off
                    try_files:
                        - $uri
                        - $uri/
                        - /index.php$is_args$args
                    fastcgi: ''
                    fastcgi_index: ''
                    fastcgi_split_path: ''
                nxvl_6qx79op5lfp0:
                    location: '~ \.php$'
                    autoindex: off
                    try_files:
                        - $uri
                        - $uri/
                        - /index.php$is_args$args
                    fastcgi: '127.0.0.1:9000'
                    fastcgi_index: index.php
                    fastcgi_split_path: '^(.+\.php)(/.*)$'
                    fast_cgi_params_extra:
                        - 'SCRIPT_FILENAME $request_filename'
                        - 'APP_ENV dev'
    proxies: {  }
apache:
    install: '1'
    settings:
        user: www-data
        group: www-data
        default_vhost: true
        manage_user: false
        manage_group: false
        sendfile: 0
    modules:
        - proxy_fcgi
        - rewrite
    vhosts:
        av_e7ca9ueaqy5l:
            servername: pathwaytothepark.mb
            serveraliases:
                - pathwaytothepark-website.dev
                - '*.vagrantshare.com'
            docroot: /var/www/project/htdocs/build
            port: '80'
            setenv:
                - 'APP_ENV dev'
            custom_fragment: ''
            ssl: '0'
            ssl_cert: ''
            ssl_key: ''
            ssl_chain: ''
            ssl_certs_dir: ''
            ssl_protocol: ''
            ssl_cipher: ''
            directories:
                avd_q12s8wf4qkvl:
                    path: /var/www/project/htdocs/build/
                    options:
                        - Indexes
                        - FollowSymlinks
                        - MultiViews
                    allow_override:
                        - All
                    require:
                        - 'all granted'
                    custom_fragment: ''
                    files_match:
                        avdfm_6qws0zpmntfc:
                            path: \.php$
                            sethandler: 'proxy:fcgi://127.0.0.1:9000'
                            custom_fragment: ''
                            provider: filesmatch
                    provider: directory
        av_25nh1hek8155:
            servername: pathwaytothepark.mb
            serveraliases:
                - pathwaytothepark-adminer.dev
            docroot: /var/www/html/adminer
            port: '80'
            custom_fragment: ''
            ssl: '0'
            ssl_cert: ''
            ssl_key: ''
            ssl_chain: ''
            ssl_certs_dir: ''
            ssl_protocol: ''
            ssl_cipher: ''
            directories:
                avd_80z619tt9gdf:
                    path: /var/www/html/adminer
                    options:
                        - Indexes
                        - FollowSymlinks
                        - MultiViews
                    allow_override:
                        - All
                    require:
                        - 'all granted'
                    custom_fragment: ''
                    files_match:
                        avdfm_hrfhnn5l8y1o:
                            path: \.php$
                            sethandler: 'proxy:fcgi://127.0.0.1:9000'
                            custom_fragment: ''
                            provider: filesmatch
                    provider: directory
php:
    install: '1'
    settings:
        version: '55'
    modules:
        php:
            - cli
            - intl
            - mcrypt
            - fpm
        pear: {  }
        pecl: {  }
    ini:
        display_errors: On
        error_reporting: '-1'
        session.save_path: /var/lib/php/session
        date.timezone: UTC
    fpm_ini:
        error_log: /var/log/php-fpm.log
    fpm_pools:
        phpfp_qgirpe941up9:
            ini:
                prefix: www
                listen: '127.0.0.1:9000'
                security.limit_extensions: .php
                user: www-user
                group: www-data
                pm: ondemand
                pm.max_children: '5'
    composer: 1
    composer_home: ''
xdebug:
    install: '0'
    settings:
        xdebug.default_enable: '1'
        xdebug.remote_autostart: '0'
        xdebug.remote_connect_back: '1'
        xdebug.remote_enable: '1'
        xdebug.remote_handler: dbgp
        xdebug.remote_port: '9000'
blackfire:
    install: '0'
    settings:
        server_id: ''
        server_token: ''
        agent:
            http_proxy: ''
            https_proxy: ''
            log_file: stderr
            log_level: '1'
        php:
            agent_timeout: '0.25'
            log_file: ''
            log_level: '1'
xhprof:
    install: '0'
wpcli:
    install: '0'
    version: v0.19.0
drush:
    install: '0'
    version: 6.3.0
ruby:
    install: '1'
    versions: {  }
python:
    install: '1'
    packages: {  }
    versions: {  }
nodejs:
    install: '0'
    npm_packages: {  }
hhvm:
    install: '0'
    nightly: 0
    composer: '1'
    composer_home: ''
    settings: {  }
    server_ini:
        hhvm.server.host: 127.0.0.1
        hhvm.server.port: '9000'
        hhvm.log.use_log_file: '1'
        hhvm.log.file: /var/log/hhvm/error.log
    php_ini:
        display_errors: On
        error_reporting: '-1'
        date.timezone: UTC
mysql:
    install: '1'
    settings:
        version: '5.5'
        root_password: '123'
        override_options: {  }
    adminer: 0
    users:
        mysqlnu_t3zg4fcwyh0w:
            name: pathway
            password: password
    databases:
        mysqlnd_91f3lw5ub28t:
            name: pathway
            sql: ''
    grants:
        mysqlng_aidvwmn9vb48:
            user: pathway
            table: 'pathway.*'
            privileges:
                - ALL
postgresql:
    install: '0'
    settings:
        global:
            encoding: UTF8
            version: '9.3'
        server:
            postgres_password: '123'
    databases: {  }
    users: {  }
    grants: {  }
    adminer: 0
mongodb:
    install: '0'
    settings:
        auth: 1
        bind_ip: 127.0.0.1
        port: '27017'
    databases: {  }
redis:
    install: '0'
    settings:
        conf_port: '6379'
sqlite:
    install: '0'
    adminer: 0
    databases: {  }
mailcatcher:
    install: '0'
    settings:
        smtp_ip: 0.0.0.0
        smtp_port: 1025
        http_ip: 0.0.0.0
        http_port: '1080'
        mailcatcher_path: /usr/local/rvm/wrappers/default
        from_email_method: inline
beanstalkd:
    install: '0'
    settings:
        listenaddress: 0.0.0.0
        listenport: '13000'
        maxjobsize: '65535'
        maxconnections: '1024'
        binlogdir: /var/lib/beanstalkd/binlog
        binlogfsync: null
        binlogsize: '10485760'
    beanstalk_console: 0
rabbitmq:
    install: '0'
    settings:
        port: '5672'
    users: {  }
    vhosts: {  }
    plugins: {  }
elastic_search:
    install: '0'
    settings:
        version: 1.4.1
        java_install: true
solr:
    install: '0'
    settings:
        version: 4.10.2
        port: '8984'

Does anyone know why /var/www/html is set to an ownership that puphpet isn't handling on the adminer install?


Source: (StackOverflow)

With Adminer: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

I am using Adminer 4.2.0 on a freshly installed LAMP. When I try to connect to the MYSQL database I get the error:

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

I get the same error when attempting to access MYSQL from command line without sudo. Do I need to create a new user to login to the database from Adminer? How can I login with root on localhost?

Any help would be greatly appreciated, I can't find much documentation or help at all on Adminer setups.


Source: (StackOverflow)

mysql 5.6 - mysql command prompt no longer working and service still running

Windows 8.1 - mySql 5.6 This is a strange one: I went into command prompt entered: mysql -uroot as usual and got back: 'mysql' is not recognized as an internal or external command, operable program or batch file.

I went looking for mysql.exe and it is just gone, not in trash or any where else... just gone. The service mysql56 is running and I can access the database with adminer and PHP.

My question is: can I extract another zip and copy the mysql.exe to C:\Program Files (x86)\MySQL (I think that's where is should be) to get back the command prompt access?

The only thing that has really changed is that I downloaded adminer management tool and adminer editor to use since the new versions of phpmyadmin have tanked and cannot run past a timeout error. I don't see how or why adminer would have snarfed the mysql executable anyway.

Thanks for any help ... did search here and else where but found nothing resolve my question.


Source: (StackOverflow)

Create Mysql Trigger before Insert [SOLVED]

i've tried to make an MYSQL Trigger on Adminer, but it doesn't work. Here is my Code:

    CREATE TRIGGER handle100kRows BEFORE INSERT ON `4013834123456`
FOR EACH ROW
BEGIN

    IF (SELECT COUNT(*) FROM `4013834123456`) = "100000" THEN BEGIN
        DELETE FROM 4013834123456 ORDER BY id LIMIT 1
    END
    END IF

END;

Following errors appear:(1064): (1064): Syntax error near '4013834123456 ORDER BY id LIMIT 1 END END IF END' at line 6

Ive just tried it with ; on the END's but then appears more errors... I work with Adminer 4.1.0 an MySQL Database! Thx for help!

UPDATE, now it works, with delimiter:

delimiter |
CREATE TRIGGER handle100kRows BEFORE INSERT ON `4013834123456`
FOR EACH ROW
BEGIN
    IF (SELECT COUNT(*) FROM `4013834123456`) = "100000" THEN
        DELETE FROM `4013834123456` ORDER BY id LIMIT 1;
    END IF;
END;
delimiter;

Source: (StackOverflow)

WP Adminer - instead Modify field appeared a strange field with text. MySQL database editing

I got a problem with the database on Adminer plugin page. Somehow, suddenly, instead Modify field appeared a strange field with the text.

screen shot: strange field

On this example text is where%5BD%5D=Y&where%5BBarCode%5D=9780753827666&where%5BASIN%5D=0753827662&where%5BAuthor%5D=Flynn%2C+Gillian&where%5BTitle%5D=Gone+Girl&where%5BSKU%5D=M456B14-09-10-15-55&where%5BSalesRank%5D=74&where%5BLowestPrice%5D=2.71&where%5BPrice%5D=2.70&where%5BMinPrice1%5D=0.00&where%5BMinPrice2%5D=2.68&where%5BMaxPrice1%5D=2.80&where%5BMaxPrice2%5D=40.00&where%5BOut%5D=FALSE&where%5BSale%5D=TRUE&where%5BForSale%5D=N&where%5BKeep%5D=FALSE&where%5BFees%5D=0.00&where%5BCurrentPrice%5D=2.80&where%5BFNSKU%5D=X000AC2VO9&where%5BCondition%5D=&where%5BQuantity%5D=9

Also, instead of button to select whole result appeared the field with the number 1. This happened to all the tables.

missing button screen shot

On phpMyAdmin everything is in order. However, on the plugin page I can't use the SQL command, not to mention that I can't check/select the rows. I\'ve tried to uninstall and re-install the plugin, but the result is the same. I ask for emergency help. I should be grateful for any advice on how to fix it.


Source: (StackOverflow)

Adminer Vagrant weird characters

I setup a vagrant box on CentOS (with puphpet) and when I access Adminer I get this weird characters and makes it imposible to use:

Adminer weird characters

Thanks in advance for any tip to troubleshoot this.


Source: (StackOverflow)

Too big POST data. Reduce the data or increase the "post_max_size"

I'm trying to upload a gzipped Mysql backup (71,2mb) through Adminer and it throws me this error:

Too big POST data. Reduce the data or increase the "post_max_size" configuration directive.

Even though my post_max_size and other php.ini settings is like this:

post_max_size = 1024M
upload_max_filesize = 1024M

Why do i keep getting this error?


Source: (StackOverflow)

Adminer cannot find PHP extensions

5.2.17, apache 2.2.5 and MySQL 5.6.22 and adminer 4.1.0-mysql

My configuration

**[SYSTEM variables]**

PHPRC = C:\PHP

PATH = ....;C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\;C:\PHP;C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.3 & MySQL Utilities 1.5.3 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.3 & MySQL Utilities 1.5.3 1.5\Doctrine extensions for PHP\

**[SYSTEM variables]**


**[PHP.ini]**
extension_dir = "C:\PHP\ext"
extension=php_mysql.dll
**[PHP.ini]**

**[httpd.conf]**
LoadModule php5_module "C:/PHP/php5apache2_2.dll"

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir "C:\PHP\"
**[httpd.conf]**

but when I go to adminer I authenticate I get this message in Adminer

Error None of the supported PHP extensions (MySQLi, MySQL, PDO_MySQL) are available. Error

but I ve tried everything but I was not able to locate error. It s weird. Is somebody here who have similar problem and figure out.

libmysql.dll is in system32 folder I really dont know what is the problem here

When I query Mysql it works so its very weird behavior.

Thanks Jakub


Source: (StackOverflow)

Adminer - protect admin interface

The Adminer documentation has a page tucked away at

http://www.adminer.org/en/pro/features/

which says

Access to the administration interface can be protected by a username and password either fixed or read from a custom table. All passwords are stored as MD5 or SHA-1 hashes, optionally with HMAC protection.

I am interpreting this to mean that it is possible to setup Adminer so even before the user can start entering a username/password for a database they have to supply admin credentials. However, it is not at all clear to me how this should be done. I'd be most grateful to anyone who might be able to tell me how to do this.


Source: (StackOverflow)

Adminer- Access denied for user 'root'@'localhost' (using password: NO)

I'm getting this error when i try to access my phpmyadmin databases from my site at 000webhost
Access denied for user 'root'@'localhost' (using password: NO) but when i type localhost in URL and enter my login details through adminer's login, i could access phphmyadmin panel, but when tried using the site,i get the error..Any suggestions My site is http://salon.host56.com/salonadmin.php


Source: (StackOverflow)

How do Adminer et al know what to update?

Here is what I am trying to understand. I have the following database table

DROP TABLE IF EXISTS `test`;
CREATE TABLE `test` (
  `Field0` int(11) NOT NULL,
  `Field1` int(11) NOT NULL,
  `Field2` enum('a','b','c') COLLATE latin2_czech_cs NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin2 COLLATE=latin2_czech_cs;

INSERT INTO `test` (`Field0`, `Field1`, `Field2`) VALUES
(10,    11, 'a'),
(10,    13, 'b'),
(10,    13, 'a');

Note the absence of any indexes, unique keys... . Before someone tells me "that is not a good idea" I have strung together this example for a good reason.

Now suppose I use Adminer (you could just as easily read phpMyAdmin etc) to edit Row 2

(10,13,b)

Now after the edit if the SQL that were issued were

UPDATE `test` SET Field2 = 'c' WHERE Field0 = '10' AND Field1 = '13';

MySQL would update two rows and the table would read

(10,11,a)
(10,13,c)
(10,13,c)

which is not the desired result and not what Adminer does. It appears to know what row to update and does just that. It is not clear to me how this is done. With many other statements - e.g. CREATE TABLE it is possible to deliberately use invalid assignments (.e.g attempt to assign a length to a TEXT field and then study the SQL on error. However, that option does not exist on row edits since Adminer actively stops you from doing invalid edits (e.g. typing in a char in an integer column).

About the only way I can think of is to tag on a LIMIT 1 at the end of the statement - which would work, kind of. However, in a table with a larger number of fields it would involve putting in a very lengthy WHERE clause when only one or two fields in that row have changed in order to help MySQL identify the right row to alter.

Perhaps there are other techniques to accomplish this that are not quite so crude that I am not aware of? I'd be most grateful to anyone who might be able to help.

To finish this post - please don't tell me that rows should be unique and I should be using indices. I am well aware of that. This is simply the worst case scenario that I am trying to resolve.


I should mention that although this question talks of MySQL I am in fact using MariaDB 10.


Source: (StackOverflow)