For mysql, use:
ALTER TABLE table_name MODIFY COLUMN column_name VARCHAR (150) NOT NULL;
-----Original Message-----
From: JoeY [mailto:vjoey0@gmail.com]
Sent: Tuesday, May 02, 2017 9:30 PM
To: 'Blind sysadmins list'
Subject: RE: [Blind-sysadmins] piping password hashes in to a mysql command
The SQL syntax is:
ALTER TABLE table_name ALTER COLUMN column_name VARCHAR (150) NOT NULL;
The NOT NULL is optional, depending on your needs.
Can you set the dovecot output to a variable? VBScript can pass a variable
into the SQL [sqlcmd] command.
Powershell might work with the SQL module, still using a variable. But I
don't know if there is a mysql equivalent.
~Joe
-----Original Message-----
From: Blind-sysadmins
[mailto:blind-sysadmins-bounces@lists.hodgsonfamily.org] On Behalf Of David
Mehler
Sent: Friday, April 28, 2017 6:15 PM
To: blind-sysadmins
Subject: [Blind-sysadmins] piping password hashes in to a mysql command
Hello,
I'm doing a database upgrade. I am increasing some columns and adding a
password hash.
What I'm wanting to do is increase one column from a varchar(128) to a
varchar(150)
I've tried:
alter table table_name set column_name varchar(150)
didn't work, can anyone spot my sql error?
I'm using SecureCRT to access the server. What I'm wanting to do is take the
output of this command:
dovecot pw -s SHA512-CRYPT
which gives me a nice lovely password and use that in an sql create or
update statement. My question how do you get that command output in to the
create or update commands? On windows I would select the information copy to
clipboard and paste. I do not believe I have that choice here.
Thanks.
Dave.
_______________________________________________
Blind-sysadmins mailing list
Blind-sysadmins@lists.hodgsonfamily.org
https://lists.hodgsonfamily.org/listinfo/blind-sysadmins