Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: [ADDON] MySQL Manager with admin integration (sNews 1.5xx - 1.6)  (Read 3636 times)

Armen

  • Sr. Member
  • ****
  • Karma: 41
  • Posts: 338
    • http://www.funnydays.ru
[ADDON] MySQL Manager with admin integration (sNews 1.5xx - 1.6)
« on: November 06, 2007, 12:33:49 am »

This addon will allow you to manage your MySQL Databases, including export, import, optimization and other commands.
It's extremely lightweight (one ~10Kb file), fast and can be password-protected.

More info:

http://phpminiadmin.sourceforge.net/

Screenshots:

http://sourceforge.net/project/screenshots.php?group_id=181023

STEP-BY-STEP:

1. Download the script. Put phpminiadmin.php in the folder, where snews.php is located.

2. Open phpminiadmin.php, find and configure nessesary strings:

Code: [Select]
#DEFAULT db connection settings
 $DB=array(
 'user'=>"",#required
 'pwd'=>"", #required
 'db'=>"",  #default DB, optional
 'host'=>"",#optional
 'port'=>"",#optional
 'chset'=>"",#default charset, optional
 );

Example:

Code: [Select]
#DEFAULT db connection settings
 $DB=array(
 'user'=>"root",#required
 'pwd'=>"", #required
 'db'=>"",  #default DB, optional, for example, snews
 'host'=>"localhost",#optional
 'port'=>"",#optional
 'chset'=>"",#default charset, optional
 );

3. To protect the script, find:

Code: [Select]
$ACCESS_PWD='';
Change it to:

Code: [Select]
$ACCESS_PWD='YOURPASSWORD';
Where 'YOURPASSWORD' is your password =).

4. To integrate a link to the script into sNews admin, add a new language variable to snews.php:

Code: [Select]
$l['s_sql'] = MySQL Admin';
Then find:

Code: [Select]
echo '<p><a href="settings/" title="'.l('settings').'">'.l('settings').'</a></p>';
And right after it place:

Code: [Select]
echo '<p><a href="phpminiadmin.php" title="'.l('s_sql').'">'.l('s_sql').'</a></p>';
(reminder: in this example snews.php and phpminiadmin.php are placed in the same folder)
« Last Edit: November 06, 2007, 12:43:23 am by Armen »
Logged
Now ogres, oh, they're much worse. They'll make a suit from your freshly peeled skin. They'll shave your liver, squeeze the jelly from your eyes... Actually, it's quite good on toast.

pwendel

  • Full Member
  • ***
  • Karma: 8
  • Posts: 106
    • sNews 1.6 in Danish
Re: [ADDON] MySQL Manager with admin integration (sNews 1.5xx - 1.6)
« Reply #1 on: November 08, 2007, 12:31:41 pm »

Nice Addon, well done!

Seems particularly useful for tweaking/debugging sessions  :)
Logged
"Opportunity is missed by alot of people because it comes dressed in blue overalls and looks like hard work" -- Thomas Edison (1847-1931)

Armen

  • Sr. Member
  • ****
  • Karma: 41
  • Posts: 338
    • http://www.funnydays.ru
Re: [ADDON] MySQL Manager with admin integration (sNews 1.5xx - 1.6)
« Reply #2 on: November 08, 2007, 04:21:05 pm »

Yep.

Seems even more useful for import/export functions: this script is more accurate than PhpMyAdmin in that matter, because doesn't mess up non-unicode text.

In future versions author is going to implement an ability to edit tables. That's gonna be awesome.
Logged
Now ogres, oh, they're much worse. They'll make a suit from your freshly peeled skin. They'll shave your liver, squeeze the jelly from your eyes... Actually, it's quite good on toast.

Joost

  • Guest
Re: [ADDON] MySQL Manager with admin integration (sNews 1.5xx - 1.6)
« Reply #3 on: November 12, 2007, 03:17:08 am »

In future versions author is going to implement an ability to edit tables. That's gonna be awesome.

It already is awesome, Armen. Downloaded 5 minutes ago and I have already created tables. Thanks for sharing.
 ;)
Logged

Ghassem Tofighi

  • Full Member
  • ***
  • Karma: 9
  • Posts: 104
    • http://ght.ir
Re: [ADDON] MySQL Manager with admin integration (sNews 1.5xx - 1.6)
« Reply #4 on: November 15, 2007, 11:30:22 am »

karma+ for you Armen
can you add cron job ability to backup and email some tables to some email every day?
Logged
Be A Color Pencil For Painting The World !

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: [ADDON] MySQL Manager with admin integration (sNews 1.5xx - 1.6)
« Reply #5 on: November 20, 2007, 11:16:24 am »

uh oh...
I think I missed that one.
Thanks for this addon Armen.
You've been karmalised for that gift. ;D

crm

  • Newbie
  • *
  • Karma: 1
  • Posts: 26
    • planetmayfield.com
Re: [ADDON] MySQL Manager with admin integration (sNews 1.5xx - 1.6)
« Reply #6 on: December 16, 2007, 04:52:21 pm »

Code: [Select]
$l['s_sql'] = MySQL Admin';

This is an AWESOME mode, thank you so much!  I never new I would not like phpMyAdmin again!  One thing though.. in the above text you are missing a ' in the variable.  It should look like this...

Code: [Select]
$l['s_sql'] = 'MySQL Admin';
Other than that, this is GREAT!!!

Logged
Endlessly banging my head against the keyboard.