[ARCHIVED THREAD] - Anyone know MySQL? (Page 1 of 2)
Posted: 2/12/2008 11:33:19 AM EDT
| How in the holy hell do I create a damn database? (MySQL vs. 5.0) |
If it uses anything close to TSQL, it should be something along the lines of "CREATE DATABASE" ![]() (Seriously, looks like it is create database dev.mysql.com/doc/refman/5.0/en/create-database.html. If it's still given ya troubles tonight, IM me, and I'll download it and see.) |
I tried the ol' "create database" but maybe I did it wrong. yay. more reading. |
what error message did you get? were you at the CLI (command line interface)?
should do it. |
Don't ask me, I only know enough MSSQL to use Enterprise Manager to export tables so I can import them into MySQL ![]() |
Using CLI and I type as you did, I get this error creat joomla; use joomla ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that This is on a dev box I built at work to test some things.... |
misspelled "create" joomla shouldn't have bugs like that in it. are you using the release version? |
Are you logging in as root? your user probably doesn't have "create database" permissions. eta: you need the "grant" command. something like
then log in as david_g17. yeah, that's a lot of security vulnerabilities.
|
shouldn't make a difference.
should log you into mysql as root user. (well, on mine it does, depends on PATH variable) eta: crap, if i could remember my password, I could walk you through it.
|
mysql> use joomla Maybe the MySQL instal got hosed...uhg |
You did it wrong. It's show tables; <cr> Not: show tables <cr> show tables; |
Yea, if you know standard SQL commands then it isn't hard to pickup. You won't be able to use a lot (if any) of the T-SQL stuff though. And unless they changed it recently, you can't create stored procedures either. |
|
ignore, subnet found the error.
maybe it needs a table.
|
you can do stored procedures with MySQL 5.0 |
Oops.... OK got this back... Empty set <0.01 sec> |
![]() My world would crumble! ETA:
My world is returning to balance ![]() |
There it is. It works. Create a table (see David's thing) and 'show tables' will list it. |
Mine already has. I need to learn how to write stored procedures on MSSQL2K, and I'm not sure where to start. |
AHHH HA!!!
Well looky there, im a lernin sumtin..
|
Nice! That was one of my biggest complaints when I was using it a couple years ago. I'm glad they added the feature. |
start with convincing them to use open source. ![]() I kid, i kid. eta: stored procedures: dev.mysql.com/doc/refman/5.0/en/stored-procedures.html |
Not going to happen, unless you have some pull at Cisco Systems... (Fear not, though. CallManager is already running on Linux - they're getting there). In the meantime, to write custom reports for UCCX (which stores reporting data in SQL server), I have to write stored procedures, and I have to do it on that platform. That's just the way it is, and I exist to make money, not debate the merits of somebody's DBMS. I'm not upset that the source isn't available, and the lack of source code isn't what my problem is. I'm upset because I don't know how to write stored procedures on SQL2K. |
Give me a place to start (book, website, anything). |
I've heard the MSDBA books that Microsoft publishes are the best out there. But, I can't verify it. I like o'reilly books a lot, but they're pretty limited on MS stuff. (I confess, I looked into getting a MSDBA a while back). |
These videos don't seem too bad: www.learnsqlserver.com/VideoTutorials/Sql-Server-Tutorials/55/Series-5-videos-Stored-Procedures-An-Introduction-to.aspx |
I think joomla has a php script that creates the tables it needs mysql> show tables; +-----------------------------+ | Tables_in_joomla | +-----------------------------+ | jos_banner | | jos_bannerclient | | jos_bannertrack | | jos_categories | | jos_components | | jos_contact_details | | jos_content | | jos_content_frontpage | | jos_content_rating | | jos_core_acl_aro | | jos_core_acl_aro_groups | | jos_core_acl_aro_sections | | jos_core_acl_groups_aro_map | | jos_core_log_items | | jos_core_log_searches | | jos_groups | | jos_menu | | jos_menu_types | | jos_messages | | jos_messages_cfg | | jos_modules | | jos_modules_menu | | jos_newsfeeds | | jos_plugins | | jos_poll_data | | jos_poll_date | | jos_poll_menu | | jos_polls | | jos_sections | | jos_session | | jos_stats_agents | | jos_templates_menu | | jos_users | | jos_weblinks |
Honestly, SQL Books Online is pretty good www.microsoft.com/downloads/details.aspx?FamilyID=A6F79CB1-A420-445F-8A4B-BD77A7DA194B&displaylang=en Assuming you know general SQL syntax, it's pretty much CREATE PROCEDURE procedure name (input variables) @var1 var type, @var2 var type, AS DECLARE @var1 var type, @var2 var type, (bunch of TSQL) GO Use @ for the first char of variables, the ones above the AS are inputs, the declares are for use in the procedure. I'll poke around for some sites a bit later
|
Easy enough. Looks similar to a function, in any structured language. How do you return values? I see input variables, I see variables private to the procedure itself, but how do you return variables (for use in another application like Crystal, for example)? |
Joomla cant even see mysql.. Cant connect to it.. |



