| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Comments:
<Jax> :( <Chrisx2> hey, how do i make a table in mysql from terminal on mandriva <computron> inviso_ im trying what you said but i get an error that no db exists at ...information_schema <Jax> mysql -u user -p youDB <Jax> ^ Chrisx2 <inviso_> computron: you'll need to upgrade mysql to 5.0 for that to work <kaber2> actually nm. i don't have access. heh :| the disk is totaly broken <Jax> computron vers? <inviso_> kaber2: ouch <Chrisx2> erm whats the default p***, or how 2 change? <kaber2> yea <inviso_> !m Chrisx2 reset root <SQL> Chrisx2: (How to Reset the Root P***word) : http://dev.mysql.com/doc/mysql/en/Resetting_permissions.html <computron> jax its access <Jax> run: mysqladmin -u root p***word 'yourP***word' <blackthorne> do mysql_install_db files get stored in /var/lib ? <Chrisx2> erm i do mysql -u user -p youDB <- changed but says *** aint a table <inviso_> blackthorne: typically, yes. /var/lib/mysql/mysql <Chrisx2> any1? <blackthorne> inviso, if i remove that dir and create it again should the user db's get clean ? <inviso_> blackthorne: yes. Shutdown mysql before doing so and make backups first <blackthorne> root@neo:..# pwd <blackthorne> .. <inviso_> Chrisx2: that didn't even make a tiny bit of sense. My only response was "buh?" which didn't seem very useful at the time <blackthorne> has this ever happened to you? <inviso_> blackthorne: eh? <Chrisx2> i was told to type this mysql -u user -p youDB to make a table but it says youDB isnt a table <Chrisx2> ... <inviso_> Chrisx2: that wouldn't make a table and it wouldn't give that as an error message. That would log you in so you could create a table <Chrisx2> how do i make a table? <inviso_> !m Chrisx2 tutorial <SQL> Chrisx2: (MySQL Tutorial) : http://dev.mysql.com/doc/mysql/en/Tutorial.html <kaber2> i guess about 50 people are goign to loose there accounts :/ <inviso_> kaber2: heh, why? <kaber2> i have a box at ev1. the first drive failed.. <kaber2> ext3_orphan_cleanup: deleting unreferenced inode 2987992 <kaber2> ext3_orphan_cleanup: deleting unreferenced inode 262265 <kaber2> ext3_orphan_cleanup: deleting unreferenced inode 262264 <kaber2> EXT3-fs: hda5: 63 orphan inodes deleted <kaber2> lots of stuff like that <inviso_> ooo, excellent :) Good backups save lives <kaber2> and i did a mysqldump in the morning, forgot to do a dump before made that drive the slave <kaber2> yea <kaber2> i need a script that automates the backup process <kaber2> i didn't think we added new custoemrs <kaber2> but we did :| <kaber2> oh well. just put an annoucnement message <inviso_> They're human. Send them chocolate if you're worried ;) <kaber2> i can't seem to reset my dam root p***wrod though <kaber2> heh <kaber2> following these directions <kaber2> http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html <blackthorne> root@neo:/home/blackthorne# /usr/bin/mysqladmin -u root p***word 'whatever' <blackthorne> /usr/bin/mysqladmin: connect to server at 'localhost' failed <blackthorne> error: 'Access denied for user 'root'@'localhost' (using p***word: YES)' <blackthorne> after a clean and succesfull install of mysqld... <blackthorne> i've tried everything but no idea what can be the problem <kaber2> lol. i'm getting the same thing <kaber2> http://rafb.net/paste/results/JXw0TM26.html <kaber2> started mysql with mysqld_safe --skip-grant-tables <inviso_> blackthorne: check for /root/.my.cnf and look for user= and p***= <blackthorne> isn't this supposed to be the command that defined user and p***word ? <blackthorne> inviso, anyway i had configured that file <inviso_> kaber2: select User, P***word from mysql.user where User = 'root' <inviso_> blackthorne: if it's setup, it would be using a p***word when you didn't have one set. That would cause the mysqladmin command to fail <kaber2> Empty Set <daniel`js> What's the best value to give to a field when you just want the values to be either '0' or '1'? <inviso_> kaber2: how about where User LIKE "%root%" ? <inviso_> daniel`js: TINYINT or ENUM <daniel`js> inviso: Thought so, but which one is slightly faster? ;) <daniel`js> enum? <inviso_> daniel`js: actually, BIT or ENUM.. BIT for sure if you're on 5.0+ <kaber2> hmm <daniel`js> Which I am =) <kaber2> Select User, where User LIKE "%root%"; <kaber2> getting an error <blackthorne> inviso, should i use mysqladmin ... -p and then enter the p***word? <inviso_> kaber2: select User, P***word from user where User LIKE "%root%"; <daniel`js> Now let's say if I have a few fields that only have the value of 0 or 1, but they're tinyint at the moment, would it be okay if I just changed that to bit? (no warnings or errors)? <inviso_> blackthorne: if it's a new install, you don't want -p or p***= defined. P***word is blank by default <kaber2> No database selected <inviso_> daniel`js: should be fine <inviso_> !tell us about disclaimer <SQL> inviso_ asked me to tell you this: We are in no way responsible for the data you will delete, proceed at your own risk and know that backups save jobs. <kitchen> I thought backups saved data <daniel`js> And jobs ;) <inviso_> kaber2: do USE mysql; first <kaber2> empty set <GNN_Ricardo> how i select a limitated field? <inviso_> kaber2: that seems bad, doesn't it? You don't have a root user. At all. <inviso_> GNN_Ricardo: a what? <GNN_Ricardo> i got a varchar with 100 chars, i wanna select only the 20~30 field(only print this 10 letters) <kaber2> hmm <inviso_> !m GNN_Ricardo string functions <SQL> GNN_Ricardo: (String Functions) : http://dev.mysql.com/doc/mysql/en/String_functions.html <kaber2> plesk is working, and if i do show databases, i get horde, psa & mysql <kaber2> hmm <kaber2> so if i don't have a root account, how am i supposed to make a user. cause it's not letting me if i use this --skip-grant-tables option <blackthorne> inviso, thanks <kaber2> weird <blackthorne> inviso, unfortunately i always need these kung fu's to set mysqld working. It's the only daemon where i still have these irritating issues. <inviso_> kaber2: you're not "making a user." You're *updating a p***word. Of course, that explains why the update didn't work :) <GNN_Ricardo> inviso_ i only found: mysql> SELECT LEFT('foobarbar', 5); <GNN_Ricardo> -> 'fooba' <GNN_Ricardo> i need two parameters (string,start,finish) <kaber2> oh <GNN_Ricardo> do you know any? <kaber2> so what your saying is that ther's no root sql account <inviso_> kaber2: true :) <kaber2> hmm <inviso_> GNN_Ricardo: seriously? Look a bit further. I didn't link the doc because I'm trying to be evil <kaber2> inviso: so i just CREATE USER root ? <GNN_Ricardo> mysql> SELECT SUBSTRING('Sakila' FROM -4 FOR 2); <inviso_> kaber2: and it will need granted "uber" permissions. Read the grant docs carefully and you should be able to get it done <GNN_Ricardo> -> 'ki' <GNN_Ricardo> this inviso? <inviso_> !m kaber2 GRANT <SQL> kaber2: (GRANT and REVOKE Syntax) : http://dev.mysql.com/doc/mysql/en/GRANT.html <inviso_> GNN_Ricardo: did it do what you want? <GNN_Ricardo> ya thanks :-) <inviso_> np, enjoy <GNN_Ricardo> do you know the same for Microsoft SQL? <inviso_> no idea <GNN_Ricardo> ojkz <kaber2> argh. these syntax's are so complicated without a sample <kaber2> heh <Drakas> how to skip each five records, when selecting? <inviso_> !m Drakas select <SQL> Drakas: (SELECT Syntax) : http://dev.mysql.com/doc/mysql/en/SELECT.html <inviso_> Drakas: see LIMIT <Drakas> sure? <sjrussel> Drakas - I don't think you can <kaber2> inviso: it's not letting me create a new user account. telling me can't do it when running --skip-grant-tables <kaber2> but if it's not --skip-grant-tables i can't login <Drakas> can you tell me exactly, im on 4.0 <Drakas> like record 1, record 6 , record 11... <Drakas> doesn'tlimit just select records from x to y? <sjrussel> right, you can't do what you're trying to do <sjrussel> and it doesn't make any sense anyway <sjrussel> if you have a relevant id, you could do where id % 5 = 0 or something <Ungy_> no it selectxts records starting at x and returns y number of records <Drakas> well, then x to (x+y( <Drakas> so i cant skip each five records, impossible? <sjrussel> do it in code. <Drakas> ok, just washelpingsome one otu <kaber2> ooks like plesk was doing something <daniel`js> Would unsigning fields slow down MySQL at all? <inviso_> Too bad he left. It would be possible with a row counter and a HAVING <Ungy_> daniel`js, unsigning slow somethign down? <Ungy_> daniel`js, I highly doubt it I could see it makign it faster
Return to
#mysql or Go to some related
logs:
error kio_media_mounthelper suse #kernel #perl gnome VS gnome-light fedora not init font path element unix 7100 suspend2ram 9600 kernel interrupt 80h NASM (EE) AIGLX: Screen 0 is not DRI capable nvidia #lgp ubuntu limit bandwitch
|
|