Giter VIP home page Giter VIP logo

bike's Introduction

BIKE

Bike is a lightweight MySQL admin tool. List of features is small but it must be enough for simple management tasks.

Installation

Download release files from https://github.com/jagermesh/bike/releases. Unpack into some folder and run

composer install

to install all required dependencies.

Portable version

There is also portable version - upload index.php and install.zip from https://github.com/jagermesh/bike/tree/master/portable to any writeable folder on your server and go there by browser - you'll get working instance of this nice MySQL management tool.

Going to use Bike for WordPress, Joomla, Drupal management?

If you are using some popular CMS (WordPress, Joomla, Drupal) - just unpack package into subfolder of your current CMS installation. That's it. Bike will identify what kind of CMS you are using and will take connection parameters from regarding config files.

No CMS?

If you are not using any CMS - create file /config.db.php in root Bike's folder and put following connection parameters into it.

<?php

br()
  ->config()
    ->set( 'db'
         , array( 'engine'   => 'mysql'
                , 'hostname' => 'localhost'
                , 'name'     => '[dbname]'
                , 'username' => '[dbuser]'
                , 'password' => '[dbpassword]'
                ));

Saved queries

Bike is not creating any tables in your database so if you are going to save your code snippets and use them later or share with other users - please adjust permissions for folder /user in root Bike's folder. It must be writeable for your webserver.

What can I do with Bike

Basically Bike is an SQL runner, so, actually, you can do pretty much if you are familiar with SQL.

Also there are some nice features included

  • 40 recent queries
  • Named saved queries
  • Queries library
  • Nice AJAX UI :)

What is Library section?

In library I put some useful SQL snippets. You can put your own, it's in file /library/library.json - just an array in JSON format:

{ "Show tables list":{"name":"Show tables list","sql":"SHOW TABLES"}
, "Show processes list":{"name":"Show processes list","sql":"SHOW PROCESSLIST"}
, "Show tables status":{"name":"Show tables status","sql":"SHOW TABLE STATUS"}
, "Show table structure":{"name":"Show table structure","sql":"DESC {{Table name}}"}
, "Show table CREATE statement":{"name":"Show table CREATE statement","sql":"SHOW CREATE TABLE {{Table name}}"}
}

I'll render nice input dialog for placeholders, enclosed in {{ }}.

Security & Restricted access

On current stage I don't care about login functionality. Put Bike into folder with name like "tASTDKUWYVEjhas" or just use Apache httpauth as workaround.

Terms & Conditions

You can use Bike. Anywhere. For any purposes. And I'm not responsible for anything.

Contacts

Have a question? Mail me to [email protected]

bike's People

Contributors

jagermesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bike's Issues

Too many queries being listed

Endless Query listing ensues each time bike is accessed - for the session it remains at last count.

The truncated query string is displayed instead of the Query Name in the Query listing.

The saved queries are not being read each time bike is accessed afresh.
The saved query count is displayed correctly but the queries do not show up till saved again.

Tested on WinXP SP3 and XAMPP 1.7.3.

Shouldn't the /bright/Bright.php file inclusion in the index.php be split up to use DIRECTORY_SEPARATOR instead of the hardcoded "/" ?

Issues getting BIKE running

I've had nothing but problems getting BIKE running on my server. I'm running a pretty clean copy of Ubuntu on a Linode, with a bare-bones set up to redirect a few domains to their respective folders and running PHP.

There are clearly dependancies that this relies on, as a stock php install doesn't do the trick. So far I've had to enable mod_dav_fs and add a to support it in apache2.conf, this got rid of my 405 error. Now I'm facing a 403 for a request to bike/api/query. I tried giving the bike directory and everything in it full read-write-execute permissions (777) but that hasn't done the trick. Making bike/api and bike/api/query myself leads to a 409 error (Cannot PUT to a collection).

I'm not really sure where to go from here; this has been far from a "plug and play" install.

Incorrect Pagination for COUNT()

Pagination is incorrect when using COUNT() function which returns only 1 row.
Bike paginate the results as if it is a non-COUNT() query.

Saved queries сounter is not updated

English

The number of saved queries, next to Saved queries at the top of the page is not updated when you delete the query from the list.

Русский язык

Количество сохранённых запросов рядом с надписью Saved queries вверху страницы не обновляется при удалении запроса из списка.

Raises an error if the query ends with a semi-colon

The following query

select * from acl;

raises

1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 20' at line 1

add charset key to $cfg array in config.db.php

Should you deal with UTF8 tables, the charset key has to be added in config.db.php, thus you would have:

br()
   ->config()
     ->set( 'db'
          , array( 'engine'   => 'mysql'
                 , 'hostname' => MYSQL_DB_HOST
                 , 'name'     => MYSQL_DB_NAME 
                 , 'username' => MYSQL_DB_USER
                 , 'password' => MYSQL_DB_PASS
         , 'charset' => 'utf8'
                 ));

Spent some time to parse the code to finallyt add that key.

Missing file bike/bright/Bright.php

I got a fresh clone on my dev server and setup the config.db.php.
Once accessing the front page of this project, get the following error of missing file:

Fatal error: require_once(): Failed opening required '/stuff/www/bike/bright/Bright.php' (include_path='.:/usr/share/php:/usr/share/pear') in /stuff/www/bike/index.php on line 3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.